API for Developers: Orders
Feedback Company avatar
Geschreven door Feedback Company
Meer dan een week geleden bijgewerkt

Create

Creates a new order and optionally an invitation, and returns the created order and invitation.

Request

Headers

The "Authorization" header for this API method contains an <access_token> placeholder. Replace it with the value of an actual access token.

Name

Value

Authorization

Bearer <access_token>

URL

Body

This API method accepts a JSON body in the request. The top-level JSON object should be an "Order" object as described in the next section.

Order

Property

Allowed Values

Required

External_id

(a unique non-empty string, max 250 characters)

Yes

Customer

(A 'Customer' object)

Yes

invitation

(an 'Invitation' object)

No

products

(An array of 'product' projects)

No

filtercode

(An optimal string, max 250 characters)

No

Customer

name

Allowed Values

Required

email

(A valid email address, max 250 characters)

Yes

fullname

(A non-empty string, max 250 characters)

No

Invitation

The "delay" and "reminder" properties represent a specific date and time when the invitation email and reminder email for the invitation should be sent. The "reminder", if given, must be at least 24 hours after the "delay".

Name

Allowed values

Required

delay

(an invitationDelay object)

Yes

reminder

(an invitationDelay object

No

InvitationDelay

Name

Allowed Values

Required

unit

"minutes","hours","days","weekdays"

Yes

amount

(A non-negative integer)

Yes

Product

Name

Allowed values

Required

external_id

(A non-empty string, max 250 characters)

Yes

name

(A non-empty string, max 250 characters)

Yes

url

(A valid url, max 2000 characters)

Yes

sku

(A non-empty string, max 250 characters)

No

gtin

(A valid GTIN-13 code)

No

image_url

(A valid url, max 2000 characters)

No

Example

 {
"external_id": "08b747cb-e20a-4644-9900-7db115e2f249",
"customer": {

"email": "appleseed@example.com",
"fullname": "John Appleseed"
},
"products": [{
"external_id": "c17b8994-7a31-4dda-b710-a1bb5cd97e55",
"sku": "rd001",
"gtin": "0075678164124",
"name": "Red Delicious",
"url": "https://www.example.com/producs/red-delicious",
"image_url": "https://www.example.com/images/red-delicious.jpeg"
}],
"invitation": {
"delay": {
"unit": "days",
"amount": 0
},
"reminder": {
"unit": "days",
"amount": 7
}
},
"filtercode": "filtercode1234"
}

Response

Headers

Name

Value

Status code

201

Status Message

Created

Example

{
"success": true
}

Was dit een antwoord op uw vraag?