Bulk Import of Orders

Method Description

Invoked with a POST request. Request address and parameters are set up via Maestra framework.

POST https://api.maestra.io/v3/operations/bulk?endpointId={API endpoint ID}&operation=DirectCrm.Orders.ImportInCurrentStatus&csvCodePage=65001&brand={brand}&identityProviderSystemName={customer ID}&externalSystem={external ID}
HTTP/1.1

Authorization: SecretKey {Secret Key}
Accept: application/xml
Content-Type: text/csv
  • csvCodePage: Windows codepage ID for CSV file. 65001 (UTF-8) is preferred.
  • csvColumnDelimiter: Column delimiter character in CSV file.
  • csvTextQualifier: Optional start/end character in column value, masking otherwise invalid characters.
  • Authorization key: The value is obtained via the system.
  • The service allows up to 60 imports per hour. If the limit is exceeded, you’ll receive 429 Too Many Requests until the ratio of tasks queued/hour drops below 60.

Field Descriptions

TitleDescription
RetailOrderWebsiteIdOrder website ID
RetailOrderBackendIdERP order ID
CustomerWebSiteIDCustomer website ID
CustomerBackendIdERP customer ID
CreatedDateTimeOrder creation date and time
LastUpdatedDateTimeOrder update date and time
PointOfContactSite/store ID where the order was updated
PaymentTypePayment type
ProductIdProduct ID
QuantityItem quantity (for each ProductId) in order
ActualPriceForCustomerOfLineFinal customer line price, including personal discounts
TotalOrderPriceTotal order price, including all discounts
StatusCurrent purchase status

Sample Request

POST https://api.maestra.io/v3/operations/bulk?endpointId=Maestra&operation=DirectCrm.Orders.ImportInCurrentStatus&csvCodePage=65001&brand=Maestra&identityProviderSystemName=WebSiteId&externalSystem=1c

Authorization: SecretKey pcSKXcJ3D
Accept: application/xml
Content-Type: text/csv

RetailOrderWebsiteId;ProductId;Quantity;ActualPriceForCustomerOfLine;Status;PointOfContact;PaymentType;DeliveryType;UpdatedDateTime;CustomerWebSiteID
25054862;730915;1;21690;New;Novosibirsk;On-Site Card Payment;Delivery;09.10.2015 7:30;5334
825054862;747366;2;4890;New;Novosibirsk;On-Site Card Payment;Delivery;09.10.2015 7:30;5334
25054862;794746;2;11010;New;Novosibirsk;On-Site Card Payment;Delivery;09.10.2015 7:30;5334