DocsBasic IntegrationSale Notification

Sale Notification

POST/webhook/notifyorder

Description

After the customer has placed its order in your webshop, call this endpoint to let FastEditor know that the print files should be generated.

Note

Order items require projectKey (the project key shared by FastEditor in the add-to-cart API call), orderItemId (your internal unique identifier), and quantity.

Note

If you do not receive a 201 response, consider the request failed. You can retry the request immediately.

Note

Production files are generated asynchronously after FastEditor receives this request. When the files are ready, FastEditor will notify your callbackUrl endpoint through File Delivery.

Authentication

API Key Required

Pass your API key in the X-Api-Key header

Request Body

Order notification payload required

FieldTypeRequiredDescription
callbackUrlstringYesCallback URL where order items print ready files can be sent after processing. See the File Delivery page for the payload your endpoint will receive. Example: https://printfiles.mystore.com
orderItemsarrayYesOrder Items.
billingInfoobjectNoBilling information of the customer. Only important when using FastEditor to submit orders to supplier directly.
orderIdstringNoYour Internal Order Identifier. Example: order_123
shippingInfoobjectNoShipping destination for the order. Only important when using FastEditor to submit orders to supplier directly.

billingInfofields

Sort fields:
FieldTypeRequiredDescription
namestringNoFull name of the customer. Example: John Doe
emailstringNoEmail address. Example: john@doe.com
address1stringNoPrimary address line. Example: Sesamstreet 1
address2stringNoSecondary address line. Example: Apt 105
citystringNoCity. Example: Eldorado
zipstringNoZIP / postal code. Example: 12345
countrystringNoCountry. Example: Netherlands

orderItemsarray item fields

Sort fields:
FieldTypeRequiredDescription
projectKeyintegerYesThe Project Key as shared by FastEditor in the add-to-cart API call. Example: 916
orderItemIdstringYesYour internal Unique Identifier for the order item. Example: item_6750898
quantityintegerYesIn what quantity this order item was ordered. Example: 50
totalSaleValuenumberNoTotal sale value for this order item: quantity multiplied by the price of a single item (not the unit price). For example, 50 items at 59.99 each have a totalSaleValue of 2999.50. Example: 2999.50
currencystringNoThe currency in which this order item's totalSaleValue is expressed. Example: USD
additionalDataobjectNoOptional object for passing extra data with the order item. It supports two optional properties:

customDataForProof (object) — Custom data to render in the Print Proof. The quotationId key has special meaning: when set, its value is rendered in the Print Proof quotation-id-value field. All other key-value pairs in customDataForProof are rendered in the Print Proof customer-reference-value field.

barcodeData — For products that have a barcode location (commonly used for photobooks), the value given to this property is encoded as a barcode and placed in the designated area of the print files.

shippingInfofields

Sort fields:
FieldTypeRequiredDescription
namestringNoFull name of the recipient.
emailstringNoEmail address.
address1stringNoPrimary address line.
address2stringNoSecondary address line.
citystringNoCity.
zipstringNoZIP / postal code.
countrystringNoCountry.

Example Request

curl -X POST "https://api.editor.staging.fasteditor.com/webhook/notifyorder" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "billingInfo": {
    "name": "John Doe",
    "email": "john@doe.com",
    "address1": "Sesamstreet 1",
    "address2": "Apt 105",
    "city": "Eldorado",
    "zip": "12345",
    "country": "Netherlands"
  },
  "callbackUrl": "https://printfiles.mystore.com",
  "orderId": "order_123",
  "orderItems": [
    {
      "projectKey": "916",
      "orderItemId": "item_6750898",
      "quantity": "50",
      "totalSaleValue": "2999.50",
      "currency": "USD"
    }
  ]
}'

Response

201Created. No response body is returned.