Skip to main content

Creating an Order in the Courier Service

This method is used to create a delivery order in the courier service's information system. When an order is ready for shipment in the Gold Apple IS, the IS sends a request containing information about the sender, recipient, delivery parameters, and shipment contents. The order number is used as the tracking number. The tracking number makes it possible to track the order and retrieve its related statuses. The status model is presented in the corresponding directory, see Appendix: Order Status Directory. The endpoint must be published over the secure HTTPS protocol.

Basic Information​

Request method typePOST
Path / URL/api/v1/orders
DescriptionMethod for sending an order from the Gold Apple IS to the courier service's IS
DirectionThe request is executed by the Gold Apple IS. The response is provided by the courier service.

Request​

Header Parameters​

ParameterData typeRequiredDescriptionComment
Authorizationstring1Access token obtained during authorization. Passed in the format Bearer <access_token>The format is defined by the courier service (see Authorization in the ECS Service)
content-typestring1Request content typeFilled in as "application/json"

Request Parameters​

№ParameterTypeRequiredDescriptionComment
1orderNumberstring1Gold Apple order numberInternal order number in the Gold Apple IS. Tracking number.
2deliveryServiceCodestring1Courier service codeAgreed upon during system integration.
3courierTariffCodestring1ECS tariff codeAgreed upon during system integration.
4isOrderFirstSendboolean1Initial submission flagFill-in rule:
  • if the order is being created for the first time, set "true"
  • if the order was corrected or re-uploaded (even without corrections), set "false"
5isOrderModifiedboolean1Flag indicating whether the order contents have changedFill-in rule:
  • if isOrderFirstSend = false AND the order composition was changed, set "true"
  • if isOrderFirstSend = false AND the order composition was NOT changed, set "false"
  • if isOrderFirstSend = true, do not send this field
6needCustomerNotificationboolean1Flag for sending notifications from the ECS side.Fill-in rule:
  • if the flag is set to true, send customer notifications by any method available to the ECS's IS
  • if the flag is set to false, no notifications from the ECS are sent at all
7senderNamestring1Sender nameExample: "Gold Apple Yekaterinburg LLC"
8shippingWarehouseobject1Object with information about the sending warehouse
9codestring1Internal Gold Apple warehouse codeGold Apple warehouse code. Example: "225"
10managerstring0Warehouse managerFull name in free-form string form.
11phonestring0Warehouse manager's phoneNo special characters, digits only (country code and area code)
12locationFromobject1Sender's parcel address object
13Address object typeobject1Object containing address information.Address object (see Appendix: Address Data Types)
14recipientobject1Object with information about the recipient
15namestring1Recipient's full name, free-form stringExample: Ivanov Ivan Ivanovich
16phonestring1Recipient's phoneNo special characters, digits only (country code and area code)
17emailstring0Recipient's emailIn email format per the generalized "ISO 27000"
18pickpointIdstring1 – if delivery to a PP
0 – if door delivery
Courier service PP codePassed if delivery is made to a pickup point (PP)
19locationToobject1 – if door delivery
0 – if delivery to a PP
Recipient's parcel addressPassed if delivery is made by courier to the customer's address
20Address object typeobject1Object containing address information.Address object (see Appendix: Address Data Types)
21packagearray of objects1Array of shipment objects
22barcodestring1Parcel barcodeExample: "M-095359727A"
23weightinteger1Total package weight (in grams)Example: "1000"
24lengthdecimal1Package dimensions. Length (in cm)Example: "20"
25widthdecimal1Package dimensions. Width (in cm)Example: "15"
26heightdecimal1Package dimensions. Height (in cm)Example: "18"
27isPartialBuyboolean1Flag indicating whether partial purchase is allowed for the packageSet to true if the parcel may not be purchased in full (partially)
28isTryOnAllowedboolean1Flag indicating whether the package may be tried onSet to true if the parcel may be given for try-on
29totalAmountdecimal1Price of the parcel's items (delivery not included)Example: "222.43"
30declaredAmountdecimal1Declared value of the parcel (delivery not included)Example: "252.43"
31paymentAmountdecimal1Amount payable for the parcel's items
32courierCommentstring0Additional instructions for handling the packagePartial delivery prohibited! Unboxing prohibited!
33itemsarray of objects1Array of item objects in the parcel
34namestring1Item nameExample: "DARLING Hydrating Restoring Sheet Mask"
35warekeystring1Item SKUExample: "19000181104"
36quantityinteger1Quantity of identical items (pcs)Example: 3
37weightnumber1Item weight (in grams)Example: 200
38isPartialBuyboolean1Flag indicating whether partial purchase is allowed for the itemSet to true if only part of the item batch may be purchased
39isTryOnAllowedboolean1Flag indicating whether the item may be tried onSet to true if the item may be given for try-on
40priceAmountdecimal1Total price of a single item unitPrice of one item unit. Example: 562.1
41declaredAmountdecimal1Declared value of a single item unitDeclared value of one item unit. Example: 564.5
42paymentAmountdecimal1Amount payable per item unit
  • If the order is prepaid, value = 0
  • If the order has not been paid for, value > 0
2449.67
43vatRateinteger1VAT rate included in the item priceThe rate is specified per 1 item unit. Example: 20
44vatSumdecimal1VAT amount on post-payment of the order (per unit)112.4
45shipmentDatedate1Shipment datePer the "ISO 8601" standard. Format: YYYY-MM-DDTHH:mm:ssZ
46shipmentTimeIntervalFromdate0Start of shipment intervalPer the "ISO 8601" standard. Format: HH:mm
47shipmentTimeIntervalTodate0End of shipment intervalPer the "ISO 8601" standard. Format: HH:mm
48deliveryDatedate1Delivery datePer the "ISO 8601" standard. Format: YYYY-MM-DDTHH:mm:ssZ
49deliveryTimeIntervalFromdate1Start of delivery intervalPer the "ISO 8601" standard. Format: HH:mm
50deliveryTimeIntervalTodate1End of delivery intervalPer the "ISO 8601" standard. Format: HH:mm
51deliveryPaymentAmountobject1Delivery service cost object
52declaredAmountdecimal1Declared value of the deliveryDeclared value of delivery, passed by the Gold Apple IS
53paymentAmountdecimal1Amount payable for delivery services
54vatRateinteger0VAT rate for the delivery service
55vatSumdecimal1VAT amount for the delivery service
56displayedAmountdecimal1Delivery charge displayed to the customerDelivery cost for the end user, displayed at checkout
57orderPaymentAmountobject1Order cost object
58declaredAmountdecimal1Declared value of the orderThe declared value for the entire order. Example: 1200
59totalAmountdecimal1Total order costTotal order amount. Example: 1000
60amountToCollectdecimal1Amount to collect from the customerExample: 500; if no payment is collected, then 0. To determine the exact cash-on-delivery amount, this field's value must be used
61currencystring1CurrencyPer the "ISO 4217" standard
62returnWarehouseobject0Return warehouse address object
63codestring0Internal Gold Apple warehouse codeGold Apple warehouse code. Example: "225"
64Address object typeobject0Object containing address information.Address object (see Appendix: Address Data Types)

Request example​

{
"orderNumber": "IAQ-126543",
"deliveryServiceCode": "EXAMPLE_CS",
"courierTariffCode": "123",
"isOrderFirstSend": true,
"isOrderModified": false,
"needCustomerNotification": false,
"senderName": "Gold Apple Yekaterinburg LLC",
"shippingWarehouse": {
"code": "225",
"manager": "Sidorov S.S.",
"phone": "79123456780"
},
"locationFrom": {
"addressType": "gar",
"fullAddress": "214014, Smolensk Region, Smolensk, Example St., 7",
"regionFias": "ed36085a-b2f5-454f-b9a9-1c9a678ee618",
"cityFias": "2763c110-cb8b-416a-9dac-ad28a55b4402",
"houseFias": "395bc31a-9fda-4804-a01b-13d79c15e3cb",
"flat": "54",
"latitude": 58.0167,
"longitude": 56.235,
"addressComment": "entrance from the courtyard"
},
"recipient": {
"name": "Ivanov Ivan Ivanovich",
"phone": "79999999999",
"email": "ivan.ivanov@gmail.com"
},
"pickpointId": null,
"locationTo": {
"addressType": "coord",
"fullAddress": "614054, Perm, 1st Example St., 5",
"cityFias": "2763c110-cb8b-416a-9dac-ad28a55b4402",
"latitude": 58.0167,
"longitude": 56.235,
"flat": "5",
"addressComment": "call on arrival"
},
"package": [
{
"barcode": "M-095359727A",
"weight": 1000,
"length": 20,
"width": 15,
"height": 18,
"isPartialBuy": true,
"isTryOnAllowed": false,
"totalAmount": 540.00,
"declaredAmount": 600.00,
"courierComment": "Partial delivery prohibited! Unboxing prohibited!",
"items": [
{
"name": "DARLING Hydrating Restoring Sheet Mask",
"warekey": "123434623",
"quantity": 3,
"weight": 200,
"isPartialBuy": false,
"isTryOnAllowed": true,
"priceAmount": 180.0,
"declaredAmount": 200.0,
"vatRate": 20,
"vatSum": 10.0
}
]
}
],
"shipmentDate": "2025-04-06T00:00:00Z",
"shipmentTimeIntervalFrom": "08:00",
"shipmentTimeIntervalTo": "10:00",
"deliveryDate": "2025-04-07T00:00:00Z",
"deliveryTimeIntervalFrom": "10:00",
"deliveryTimeIntervalTo": "18:00",
"deliveryPaymentAmount": {
"declaredAmount": 45.00,
"displayedAmount": 39.90
},
"orderPaymentAmount": {
"declaredAmount": 645.00,
"totalAmount": 579.90,
"amountToCollect": 0.00,
"vatSum": 100.00,
"currency": "RUB"
},
"returnWarehouse": {
"code": "333",
"addressType": "coord",
"fullAddress": "191014, Saint Petersburg, Example St., 7",
"cityFias": "2763c110-cb8b-416a-9dac-ad28a55b4402",
"latitude": 59.791517,
"longitude": 30.120332,
"flat": null,
"addressComment": "return warehouse, ask for the shift supervisor"
}
}

Response​

Response Codes and Messages​

CodeStatusMessageReason
200OKOrder has been createdEverything completed successfully. The order was created in the courier service's IS
400Bad RequestMissing or inappropriate required parametersRequired parameters are missing or invalid. The response body must list the names of the fields that failed validation, in an arbitrary string format.
401UnauthorizedToken is invalidAuthentication error at the courier service
403ForbiddenHas no permissionInsufficient permissions
500Internal Server ErrorServer unavailableThe server is unavailable

Successful Response Parameters​

ParameterData typeRequiredDescriptionComment
ecsOrderNumberstring1Order identifier in the courier serviceDelivery order number assigned in the courier service's IS.
orderNumberstring1Gold Apple order number sent in the requestInternal order number in the Gold Apple IS. Tracking number
createdAtdate1Date and time the order was registeredPer the "ISO 8601" standard, UTC0 (YYYY-MM-DDThh:mm:ssZ)

Successful response example​

{
"ecsOrderNumber": "f91ae5a4-3b1c-4e7a-8c29-72b1db2025a1",
"orderNumber": "IAQ-126543",
"createdAt": "2025-05-10T10:41:22Z"
}

Unsuccessful Response Parameters​

ParameterData typeRequiredDescription
errorMessagestring1Human-readable description of the error
errorCodestring0see Appendix: Error Code Directory

Unsuccessful response example​

{
"errorMessage": "Missing or inappropriate required parameters",
"errorCode": "Addr_01"
}