Create/Update transactions in batch
Create or replace existing Transaction with updates. Can be done in batch. Max size 500. All dates must be in range 1970-01-01 00:00:00 and 2105-12-31 23:59:59 or null (where applicable)
Body Required
id is required when updating/replacing a Transaction
-
message string
-
reference string
-
referenceField string
-
statusCode integer
POST /v1/transactions/batch
curl \
-X POST https://ma-api.maddenanalytics.com/v1/transactions/batch \
-H "Authorization: $API_KEY" \
-d '[{"message":"Missing BrandName","reference":"123456-001-43","referenceField":"key","statusCode":400}]'
Request example
[
{
"message": "Missing BrandName",
"reference": "123456-001-43",
"referenceField": "key",
"statusCode": 400
}
]
Response examples (200)
[
{
"cancelledDate": "null",
"channel": 1,
"completedDate": "2022-08-17T17:00:00+02:00",
"createdDate": "2022-08-17T10:53:53+02:00",
"currencyCode": "SEK",
"customerName": "B2B Company Inc",
"deliveryDate": "2021-11-15T10:15:30Z",
"externalCostCenterID": "OL",
"externalCustomerID": "1234-567",
"externalInfo": "{}",
"externalParentID": "string",
"externalRowID": "string",
"externalStoreID": "store101",
"externalTransactionID": "779644",
"id": 42,
"items": [
{
"ageGroup": "Senior",
"brandName": "ACME",
"category": "Sneakers",
"collection": "SS21",
"color": "Black",
"costPrice": 45.5,
"costPriceCurrency": "USD",
"customFields": "{}",
"deliveryWindow": "IMMEDIATE",
"ean": "7340192703345",
"externalID": "99887766",
"externalItemID": "779644-1000",
"fulfillmentType": 0,
"gender": "gender",
"key": "7340192703345",
"moneyDiscount": 380,
"moneyItemTotalNet": 3040,
"moneyItemTotalVat": 760,
"primaryWarehouseExternalID": "central-ws",
"productGroupID": "123456",
"productName": "Petter",
"productType": 1,
"quantity": 1,
"season": "Spring/Summer",
"shipments": [
{
"externalWarehouseID": "central-ws",
"quantity": 1,
"shipmentDate": "2022-08-17T16:50:50+02:00",
"shipmentID": "779644-1"
}
],
"size": "43",
"sku": "123456-001-43",
"supplier": "Acme Enterprises AB",
"variantGroupID": "123456-001",
"variantName": "Petter Black",
"vatValue": 25,
"vendorSKU": "9876543-001-43",
"year": "2021"
}
],
"market": "Sweden",
"orderType": "Standard",
"statements": [
{
"customFields": "{}",
"name": "Cart Discount",
"priceNet": 159.2,
"priceVat": 39.8,
"type": 6
}
],
"type": 1
}
]
Response examples (default)
{
"error": "Error Type (if any)",
"message": "Message describing the error",
"statusCode": 400
}