Template Docs Commerce APIs Webhooks Tools
Get Started
Get Started

Fulfill an order

POST https://api.squarespace.com/{api-version}/commerce/orders/{id}/fulfillments

Updates the status of a specific order to fulfilled, with options to include shipment information and send a customer notification. The Order resource contains information about an order, where fulfillmentStatus is the status for an order.

Read the Overview to learn more about the resource.

Note: Additional shipments can be added to an Order at any time, even if its status is FULFILLED.

Parameters

{api-version} string
required

See the Orders API Overview page for the current API version.


{id} string
required

Specifies the Order to update.

Request example

Read the Making requests guide to learn why specific headers are necessary, and why some are omitted. Every request should also abide by Squarespace rate limits.

curl "https://api.squarespace.com/1.0/commerce/orders/123/fulfillments" \
  -i \
  -H "Authorization: Bearer YOUR_API_KEY_OR_OAUTH_TOKEN" \
  -H "User-Agent: YOUR_CUSTOM_APP_DESCRIPTION" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{'\
    # Indicates whether the customer should receive
    # an email notification about the added shipments.
    '"shouldSendNotification": true,'\
    # Array of shipment data.
    '"shipments": [' \
      '{ '\
        # Required; ISO 8601 UTC date and time string. Represents the moment the shipment occurred.
        '"shipDate": "2017-01-28T22:19:26.980Z",' \
        # Required; string. The name of the carrier handling the shipment.
        '"carrierName": "USPS",' \
        # Required; string. Carrier`s level of service for shipping.
        '"service": "Priority Mail",' \
        # Required; string. Carrier`s parcel tracking number.
        '"trackingNumber": "9400109699939624119857",' \
        # Optional; string. URL provided by carrier to track the shipment; must adhere to valid URL formatting.
        '"trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=9400109699939624119857"' \
      '}, {'\
        '"shipDate": "2017-01-29T22:19:26.980Z",' \
        '"carrierName": "FedEx",' \
        '"service": "Same-Day Delivery",' \
        '"trackingNumber": "103932814692659",' \
        '"trackingUrl": "https://www.fedex.com/apps/fedextrack/?tracknumbers=103932814692659"' \
      '}' \
    ']' \
  '}'

Response example

A response to a successful request will not contain any data.

Status codes and error conditions

204 NO CONTENT

The request was successful. The message body does not contain any data.


400 BAD REQUEST

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT
One or more trackingUrls are invalid.

Subtype: MISSING_ARGUMENT
One or more of the required fields are missing.


404 NOT FOUND

Type: INVALID_REQUEST_ERROR

Subtype: INVALID_ARGUMENT
The requested Order was not found.


409 CONFLICT

Type: CONFLICT

Subtype: CONCURRENT_MODIFICATION
A request using the provided Order is already in progress.