Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #81 from blackforest-t/master
Browse files Browse the repository at this point in the history
+order_id desc
  • Loading branch information
source-c authored Jul 14, 2021
2 parents 2efd710 + d63332f commit 46ff2de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adoc/bms_aaS/erp_api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ protocol_method:: POST
method_name:: agent/parcel
method_params:: new
request_body:: {"order_id": "<EXT Order ID>", "receiver": { "id": "<EXT User ID>", "phone": "<PHONE 380XXYYYYYYY>", "email" : "<USER EMAIL>", "first name" : "<FIRST NAME>", "last_name": "<LAST NAME>", "patronymic": "<user patronymic>"}, "delivery_type": "<DELIVERY TYPE>", "dest" : [<LATITUDE>, <LONGITUDE>], ["dest_address_id": "<destination address ID>"], "dest_apartment": "<DEST APARTMENT>", "weight" : <WEIGHT GRAM as INTEGER>, "price" : <PRICE as DECIMAL(10,2)>, "cod_amount" : <PRICE as DECIMAL(10,2)>, "type" : "<TYPE CODE>:<CLASS CODE>", "note" : "<USER NOTE>", "created_at": "<DATE TIME in ISO 8601>", "contragent_id" : "<CONTRAGENT ID>", "sender": "<SENDER USER ID>", "dimensions": [<WIDTH, mm AS INTEGER>, <HEIGHT, mm AS INTEGER>, <DEPTH, mm AS INTEGER>], "_comment" : "<SENDER's comment>", "items": [<PARCEL ITEM SPEC>, ...], "rolling_payments": <BOOLEAN>}
expected_result:: 200 {"id" : "<PARSEL ID>", "success": true}
expected_result:: 200 {"id" : "<PARSEL ID>", "code": "<TTN CODE>", "success": true}

NOTE: Если не указывать `order_id` в теле запроса, он будет сгенерирован системой.

NOTE: Возможно указание параметра `dest` (координаты) *или* `dest_address_id` (ID адреса)

NOTE: описание `PARCEL_ITEM_SPEC`: {"barcode": "<UNIQ BARCODE>", "sku": "<SUPPLIER SKU NAME>", "name": "<NAME>", "brand": "<BRAND>", "size": "<SIZE>", "quantity": <QUANTITY as INTEGER>, "weight": <WEIGHT GRAM as INTEGER>, "price": <PRICE as DECIMAL(10,2)>, "comment": "<OPTIONAL COMMENT>", "photos":["<OPTIONAL PHOTO_URL_LIST>"], "color": "<OPTIONAL COLOR NAME>", "contragent_id": "<CONTRAGENT_ID>", "non_returnable": <BOOLEAN>}

NOTE: Ключи: +
`cod_amount`, `contragent_id`, `sender`, `dimensions`, `_comment`, `items`, `rolling_payments` -- *опциональны.* +
`cod_amount`, `contragent_id`, `sender`, `dimensions`, `_comment`, `items`, `rolling_payments`,`order_id` -- *опциональны.* +
`contragent_id` - необходимо указывать если в `type=COD`, так же в теле `item`, если `rolling_payments: true`

NOTE: Для посылок с классификатором оплаты `COD` в качестве значения `cod_amount` будет подставляться параметр `price` в случае отсутствия явного его указания в параметрах. *`cod_amount` не может быть больше чем `price`*
Expand Down

0 comments on commit 46ff2de

Please sign in to comment.