Fulfillment.com

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 [SOAP…

E-commerce#openapi#ecommerce

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Welcome to our current iteration of our REST API. While we encourage you to upgrade to v2.0 we will continue support for our SOAP API.

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

{
  id: 123
}

A Potential Future Response

{
  id: 123,
  reason: "More Knowledge"
}

Getting Started

We use OAuth v2.0 to authenticate clients, you can choose implicit or password 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 POST /oauth/access_token.

A simple concept to achieve this is outlined below.

  1. Your application/script will ask you for your username and password, your client_id and client_secret will be accessible via a DB or ENV.
  2. Request an access_token

+ Your function should be capable of formatting your request for both a grant_type of \"password\" (step 1) and \"refresh_token\" (step 4).

  1. Store the access_token and refresh_token so future requests can skip step 1
  2. When the access_token expires request anew using your refresh_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 ISO 8601 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.

  • recordedOn When we received your order. This will never change.
  • dispatchDate When 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.
  • departDate When 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.

HeaderResponse
Status400 Bad Request
{
  "message": "Invalid request body"
}

With Context

New order with duplicate merchantOrderId.

HeaderResponse
Status409 Conflict
{
  "message": "Duplicate Order",
  "context": {
    "id": 123
  }
}

Status Codes

Codes are a concatenation of State, Stage, and Detail.

^([0-9]{2})([0-9]{2})([0-9]{2})$

CodeStateStageDetail
010101Processing OrderRecievedCustomer Order
010102Processing OrderRecievedRecieved
010201Processing OrderApproved
010301Processing OrderHoldMerchant Stock
010302Processing OrderHoldMerchant Funds
010303Processing OrderHoldFor Merchant
010304Processing OrderHoldOversized Shipment
010305Processing OrderHoldInvalid Parent Order
010306Processing OrderHoldInvalid Address…

Endpoints 13

Auth

  • POSTGenerate an Access Token/oauth/access_tokenBy default tokens are valid for 7 days while refresh tokens are valid for 30 days. If your grant_type is "password" include the username and password, if…

Orders

  • GETList of Orders/orders?fromDate=string&toDate=string&merchantIds=0&warehouseIds=0&page=1&limit=80&hydrate=integratorRetrieve many orders at once
  • POSTNew Order/ordersError Notes: * When 409 Conflict is a 'Duplicate Order' the context will include the FDC id, see samples.
  • GETOrder Details/orders/:id?merchantId=0&hydrate=integratorFor the fastest results use the FDC provided id however you can use your merchantOrderId as the id.
  • DELETECancel an Order/orders/:idRequest an order is canceled to prevent shipment.

Inventory

  • GETList of Item Inventories/inventory?page=1&limit=80&merchantIds=0&warehouseIds=0&externalSkuNames=stringRetrieve inventory for one or more items. This API requires elevated permissions, please speak to your success manager.

Partners

  • PUTShip an Order/orders/:id/shipNote, this API is used to update orders and is reserved for our shipping partners.
  • PUTUpdate Order Status/orders/:id/statusNote, this API is used to update orders and is reserved for our shipping partners.

Returns

  • GETList Returns/returns?fromDate=string&toDate=string&page=1&limit=80Retrieves summary return activity during the queried timespan. Although return knowledge can be learned from GET /orders/{id} it can take an unknown amount of…
  • PUTInform us of an RMA/returnsInform FDC of an expected return.

Tracking

  • GETTracking/track?trackingNumber=stringGet uniformed tracking events for any package, this response is carrier independent. Please note, an API Key is required for throttling purposes, please…

Users

  • GETAbout Me/users/meReturns the user profile of the access token's owner. This could be useful if managing multiple accounts or confirming validity of a token.

Accounting

  • GETList Order Accounting/accounting?fromDate=string&toDate=string&page=1&limit=80&warehouseIds=0&orderIds=0&hydrate=itemsRetrieves accounting activity during the queried timespan.

API details

Base URL
https://api.fulfillment.com/v2
Authentication
An API key in the x-api-key header
OAuth 2.0 (implicit, password flows) with 1 scope
Operations
13 operations on 10 pathsGET 7PUT 3POST 2DELETE 1
Main resources
Orders 4Partners 2Returns 2Accounting 1Auth 1Inventory 1Tracking 1Users 1
Response formats
application/json
Description format
OpenAPI 3.0.1, API version 2.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Fulfillment.com APIv2 in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Fulfillment.com APIv2 collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the x-api-key header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Generate an Access Token” (POST /oauth/access_token), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the 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 [SOAP… It is listed under E-commerce and has 13 endpoints.

Who publishes the Fulfillment.com APIv2?

It is listed from Fulfillment.com's public API description (an OpenAPI document), not published by Fulfillment.com on Swastik Codes. Anyone who controls fulfillment.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Fulfillment.com APIv2?

Requests go to https://api.fulfillment.com/v2. Endpoint paths are added to this base URL.

How do I authenticate with the Fulfillment.com APIv2?

It accepts 2 methods: an API key in the x-api-key header; OAuth 2.0 (implicit, password flows) with 1 scope.

How many endpoints does the Fulfillment.com APIv2 have?

13 operations on 10 paths (7 GET, 3 PUT, 2 POST, 1 DELETE). The largest groups are Orders, Partners, Returns, Accounting.

Is forking the Fulfillment.com APIv2 free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.