Fulfillment.com APIv2
Welcome to our current iteration of our REST API. While we encourage you to upgrade to v2.0 we will continue support for our .
Versioning
The Fulfillment.com (FDC) REST API is version controlled and backwards compatible. We have many future APIs scheduled for publication within our v2.0 spec so please be prepared for us to add data nodes in our responses, however, we will not remove knowledge from previously published APIs.
A Current Response
A Potential Future Response
Getting Started
We use OAuth v2.0 to authenticate clients, you can choose or grant type. To obtain an OAuth client_id and client_secret contact your account executive.
Tip: Generate an additional login and use those credentials for your integration so that changes are accredited to that "user".
You are now ready to make requests to our other APIs by filling your Authorization header with Bearer {access_token}.
Perpetuating Access
Perpetuating access to FDC without storing your password locally can be achieved using the refresh_token returned by .
A simple concept to achieve this is outlined below.
- Your application/script will ask you for your
usernameandpassword, yourclient_idandclient_secretwill be accessible via a DB or ENV.
- Your function should be capable of formatting your request for both a
grant_typeof "password" (step 1) and "refresh_token" (step 4).
- Store the
access_tokenandrefresh_tokenso future requests can skip step 1 - When the
access_tokenexpires request anew using yourrefresh_token, replace both tokens in local storage.
- If this fails you will have to revert to step 1.
Alternatively if you choose for your application/script to have access to your username and password you can skip step 4.
In all scenarios we recommend storing all credentials outside your codebase.
Date Time Definitions
We will report all date-time stamps using the standard. When using listing API's where fromDate and toDate are available note that both dates are inclusive while requiring the fromDate to be before or at the toDate.
The Fulfillment Process
Many steps are required to fulfill your order we report back to you three fundamental milestones inside the orders model.
-
recordedOnWhen we received your order. This will never change. -
dispatchDateWhen the current iteration of your order was scheduled for fulfillment. This may change however it is an indicator that the physical process of fulfillment has begun and a tracking number has been assigned to your order. The tracking number MAY CHANGE. You will not be able to cancel an order once it has been dispatched. If you need to recall an order that has been dispatched please contact your account executive. -
departDateWhen we recorded your order passing our final inspection and placed with the carrier. At this point it is safe to inform the consignee of the tracking number as it will not change.
Evaluating Error Responses
We currently return two different error models, with and without context. All errors will include a message node while errors with context will include additional information designed to save you time when encountering highly probable errors. For example, when you send us a request to create a duplicate order, we will reject your request and the context will include the FDC order id so that you may record it for your records.
Without Context
New order with missing required fields.
With Context
New order with duplicate merchantOrderId.
Status Codes
Codes are a concatenation of State, Stage, and Detail.
^([0-9]{2})([0-9]{2})([0-9]{2})$
{ id: 123}{ id: 123, reason: "More Knowledge"}{ "message": "Invalid request body"}{ "message": "Duplicate Order", "context": { "id": 123 }}- Homepage
- https://api.apis.guru/v2/specs/fulfillment.com/2.0.json
- Provider
- fulfillment.com
- OpenAPI version
- 3.0.1
- Spec (JSON)
- https://api.apis.guru/v2/specs/fulfillment.com/2.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/fulfillment.com/2.0/openapi.yaml
Tools (15)
Extracted live via the executor SDK.
-
accounting.getAccountingRetrieves accounting activity during the queried timespan.
-
auth.postOauthAccessTokenBy default tokens are valid for 7 days while refresh tokens are valid for 30 days. If your
grant_typeis "password" include theusernameandpassword, if however yourgrant_typeis "refresh_token" the username/password are not required, instead set therefresh_token -
inventory.getInventoryRetrieve inventory for one or more items. This API requires elevated permissions, please speak to your success manager.
-
orders.deleteOrdersIdRequest an order is canceled to prevent shipment.
-
orders.getOrderFor the fastest results use the FDC provided
idhowever you can use yourmerchantOrderIdas theid. -
orders.getOrdersRetrieve many orders at once
-
orders.postOrdersError Notes:
- When
409 Conflictis a 'Duplicate Order' thecontextwill include the FDCid, see samples.
- When
-
partners.putOrdersIdShipNote, this API is used to update orders and is reserved for our shipping partners.
-
partners.putOrdersIdStatusNote, this API is used to update orders and is reserved for our shipping partners.
-
returns.getReturnsRetrieves summary return activity during the queried timespan. Although return knowledge can be learned from
GET /orders/{id}it can take an unknown amount of time for an order that is refused or undeliverable to return to an FDC facility. Instead we recommend regularly querying this API. -
returns.putReturnsInform FDC of an expected return.
-
tracking.getTrackGet uniformed tracking events for any package, this response is carrier independent. Please note, an API Key is required for throttling purposes, please contact your success manager for details.
-
users.getUsersMeReturns the user profile of the access token's owner. This could be useful if managing multiple accounts or confirming validity of a token.
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools