Fulfillment.com APIv2

Description

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
010307Processing OrderHoldBy Admin
010401Processing OrderAddress ProblemIncomplete Address
010402Processing OrderAddress ProblemInvalid Locality
010403Processing OrderAddress ProblemInvalid Region
010404Processing OrderAddress ProblemAddress Not Found
010405Processing OrderAddress ProblemMany Addresses Found
010406Processing OrderAddress ProblemInvalid Postal Code
010407Processing OrderAddress ProblemCountry Not Mapped
010408Processing OrderAddress ProblemInvalid Recipient Name
010409Processing OrderAddress ProblemBad UK Address
010410Processing OrderAddress ProblemInvalid Address Line 1 or 2
010501Processing OrderSku ProblemInvalid SKU
010501Processing OrderSku ProblemChild Order has Invalid SKUs
010601Processing OrderFacility ProblemFacility Not Mapped
010701Processing OrderShip Method ProblemUnmapped Ship Method
010702Processing OrderShip Method ProblemUnmapped Ship Cost
010703Processing OrderShip Method ProblemMissing Ship Method
010704Processing OrderShip Method ProblemInvalid Ship Method
010705Processing OrderShip Method ProblemOrder Weight Outside of Ship Method Weight
010801Processing OrderInventory ProblemInsufficient Inventory In Facility
010802Processing OrderInventory ProblemIssue Encountered During Inventory Adjustment
010901Processing OrderReleased To WMSReleased
020101Fulfillment In ProgressPostage ProblemAddress Issue
020102Fulfillment In ProgressPostage ProblemPostage OK, OMS Issue Occurred
020103Fulfillment In ProgressPostage ProblemPostage Void Failed
020201Fulfillment In ProgressPostage Acquired
020301Fulfillment In ProgressPostage VoidedPostage Void Failed Gracefully
020301Fulfillment In ProgressHoldDeparture Hold Requested
020401Fulfillment In Progress4PL Processing
020501Fulfillment In Progress4PL ProblemOrder is Proccessable, Postage Issue Occurred
020601Fulfillment In ProgressLabel Printed
020701Fulfillment In ProgressShipment Cubed
020801Fulfillment In ProgressPicking Inventory
020901Fulfillment In ProgressLabel Print Verified
021001Fulfillment In ProgressPassed Final Inspection
030101ShippedFulfilled By 4PL
030102ShippedFulfilled By 4PLSuccessfully Fulfilled, OMS Encountered Issue During Processing
030201ShippedFulfilled By FDC
040101ReturnedReturned
050101CancelledCancelled
060101TestTestTest

Use this page to mock Fulfillment.com APIv2 in your testing and development.

Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of Fulfillment.com APIv2, which will allow you to keep building and testing even if the actual API you isn't currently available.

Related mocks

Compliance API

Service for providing information to

Viator API Documentation & Specification – Merchant Partners

<style

Marketing API

The Marketing API offers two platforms

Recommendation API

The Recommendation API returns

FraudLabs Pro SMS Verification

Send an SMS with verification code and a

Catalog API

The Catalog API allows users to search

Ready to accelerate your development flow

Shorter release cycles, more predictable schedules and fewer defects in production.
Start Mocking for Free *Free forever. No credit card needed