Modifying an order

An order can be updated as long as its status is transient (CREATED or PENDING).

Therefore, the initial transaction must not be captured in the bank.

In case of an Order with the CREATED status, all values are editable, without limitations.

In case of an Order with the PENDING status, the PUT request is rejected if the two following values are identical to the ones in the previous record:

  • amount, determined by the total amount of the items.
    The update request cancels and replaces all items of the initial Order.
  • expected_capture_date in UTC in the YYYYMMDDhhmmss format.
    The comparison of expected_capture_date takes only the date into account.
    For example, 20200101100000 (1 January 2020 at 10 a.m.) equals to 20200101180000 (1 January 2020 at 20 p.m.).

Furthermore, the amount cannot be higher than the initial amount of the order (i.e. value recorded in initial_amount).

Example of a PUT ORDER call:

PUT https://secure.lyra.com/marketplace/orders/515abac9-6cb2-4e21-8a25-b08d7e41e43c

Example of a PUT ORDER response

{
	"marketplace": "ebfb36ab-2d30-4326-adb9-e16b0c9a89f3",
	"reference": "MKP BURO example",
	"description": "Office supplies order",
	"currency": "EUR",
	"url_return": "https://URLreturn.com",
	"items": [{
		"seller": "d0f80202-0676-4d8d-9247-f455f30aec1b",
		"reference": "commburo",
		"description": "commission BURO",
		"amount": 150,
		"is_commission": true
	},
	{
		"seller": "5d0ef88c-3345-4b33-948e-80e23d553b73",
		"reference": "STV1",
		"description": "Green pens",
		"amount": 1000,
		"is_commission": false
	},
	{
		"seller": "d0f80202-0676-4d8d-9247-f455f30aec1b",
		"reference": "liv",
		"description": "Delivery",
		"amount": 500,
		"is_commission": false
	}
	],
	"buyer": {
		"type": "PRIVATE",
		"email": "jean.dupont@buyer.fr",
		"phone_number": "+33 (0)1 11 22 33 44",
		"reference": "ZhIsYM"
	},
	"shipping": {
		"address": {
			"zipcode": "59123",
			"street_number": "37",
			"country": "FR",
			"street": "rue Marcel Philippe",
			"city": "Nantes"
		},
		"shipping_method": "RELAY_POINT"
	}
}