Create new partner order
- Authentication
This method requires authentication.
Summary
Create Order
Description
This method creates an order based on the provided details which include the customer's details, payment method, date, and time slot for the work, address details, and some additional partner details.
Steps to create a new customer's order:
You have to get customer's first name, last name, address and phone number.
You have to compose object Partner details object using data from your profile and Get item list.
You have to compose object Datetime object using data from Get free master slots and wishes of customer.
You have to set field
payment_methodto"stripe"if customer wants to pay by credit card or to"cash"if he wants to pay by cash.You have to Upload image of store receipt to the Service and pass result id to the
image_uuidsfield.Having all this you can send POST request to this endpoint.
Body Parameters
name | type | data type | default | description |
|---|---|---|---|---|
customer | required | object customer | N/A | customer info |
address | optional | object address | N/A | delivery/assembly address |
partner_details | required | object of details | N/A | delivery type |
datetime | required | array of datetime | N/A | datetime that customer prefers |
payment_method | required | string | N/A | payment method |
image_uuids | required | array of strings | N/A | array of uploaded images linked to this order |
Customer object
See more: Customer
name | type | data type | default | description |
|---|---|---|---|---|
phone_number | required | string | N/A | mobile phone number of customer |
first_name | required | string | N/A | first name of customer |
last_name | required | string | N/A | last name of customer |
Datetime object
See more: Datetime
name | type | data type | default | description |
|---|---|---|---|---|
date | required | string (YYYY-MM-DD) | N/A | date of work |
timeslot | required | string [ | N/A | timeslot to work |
Address object
See more: Address
name | type | data type | default | description |
|---|---|---|---|---|
address | required | string | N/A | string representing the address |
coordinates | required | { lat: double, lon: double } | N/A | object containing coordinates of point |
details | required | string | N/A | string providing detailed information about the address |
zip | required | string | N/A | string representing the post code of the address |
Partner details object
name | type | data type | default | description |
|---|---|---|---|---|
store_id | required | string | N/A | store id (see store ids) |
items | required | array of item | N/A | items (see Get item list) |
instock | required | boolean | N/A | flag if all items are in stock |
delivery_type | required | string |
| delivery type |
Item object
See more: Get item list, Find items by name
name | type | data type | default | description |
|---|---|---|---|---|
id | required | integer | N/A | item id (see Get item list) |
count | required | integer | N/A | count of items |
delivery | required | boolean |
| flag if delivery is needed for this item |
assembly | required | boolean |
| flag if assembly is needed for thi item |
Response
The response data is an object with the following properties:
- _id: integer
Unique id of order
- title: string
Title of order (sets on creation)
- _status: string
Current status of order (see Statuses)
- _substatus: string
Current substatus of order (see Substatuses)
- partner: string
Partner name for whom this order was created
- partner_details: object
This property contains additional details about the order:
instock: boolean. Flag showing if all order items are in stock
store_id: string. Store id
store_title: string. Store title
Good Response example
Bad Responses Examples
http code | response example |
|---|---|
| see 401 Unauthorized |
|