Create or Update Distribution Orders using externalDOID and externalRowID

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.maddenanalytics.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Madden Analytics API MCP server": {
    "url": "https://docs.maddenanalytics.com/mcp"
  }
}

Close
POST /v2/api/distributionorders/batch

Create or Update Distribution Orders using externalDOID and externalRowID

application/json

Body Required

composite key is required per item

  • cancelledDate string

    Date that the order was cancelled

  • completedDate string

    Date that the order was received and completed:

  • deliveredQuantity integer

    Quantity that has been relocated

  • deliveryDate string

    Date that the order will be delivered

  • deliveryWindow string

    Delivery Window of DO (if any)

  • externalComment string

    External Comment

  • externalDistributionOrderId string Required

    The external distribution order id used as a header

  • externalRowId string

    The external row id

  • fromWarehouseExternalId string Required

    The external id of the warehouse where quantity is moved from

  • id integer
  • key string Required

    Key, used as a reference to source system

  • label string

    Label of the DO (if any)

  • orderDate string Required

    Date that the purchase order was created

  • orderType string

    Order type of DO (if any)

  • quantity integer

    Quantity to be relocated

  • season string

    Season that the key belong to. Only used for product versioning.

  • shippedAt string

    Date that the order was shipped

  • sku string

    SKU of variant. Should be unique per size/variant

  • status string

    Default values that are set based on other fields: CANCELLED if CancelledAt is set, COMPLETED if DeliveredQuantity >= Quantity else PROCESSING. Additional possible statuses: ALLOCATED, IN TRANSIT. (handled manually)

  • toWarehouseExternalId string Required

    The external id of the warehouse where quantity is moved to

Responses

  • 200 application/json

    Returns an array of responses for each item in the batch, 400 if any item fails

    Hide response attributes Show response attributes object
    • message string
    • reference string
    • referenceField string
    • statusCode integer
  • default application/json

    All errors will return the same object with a describing code & message

    Hide response attributes Show response attributes object
    • error string
    • message string
    • statusCode integer
POST /v2/api/distributionorders/batch
curl \
 --request POST 'https://api.maddenanalytics.com/v2/api/distributionorders/batch' \
 --header "Content-Type: application/json" \
 --data '[{"cancelledDate":"2021-07-19T14:05:257Z","completedDate":"2021-07-19T14:05:257Z","deliveredQuantity":2,"deliveryDate":"2021-07-19T14:05:22.257Z","deliveryWindow":"SS24","externalComment":"Express delivery needed","externalDistributionOrderId":"DO-14534","externalRowId":"21020","fromWarehouseExternalId":"central","id":42,"key":"7340192703345","label":"DO-14534","orderDate":"2021-07-19T14:05:22.257Z","orderType":"Transfer","quantity":4,"season":"Spring/Summer","shippedAt":"2021-07-19T14:05:22.257Z","sku":"123456-001-43","status":"CANCELLED","toWarehouseExternalId":"store1"}]'
Request examples
[
  {
    "cancelledDate": "2021-07-19T14:05:257Z",
    "completedDate": "2021-07-19T14:05:257Z",
    "deliveredQuantity": 2,
    "deliveryDate": "2021-07-19T14:05:22.257Z",
    "deliveryWindow": "SS24",
    "externalComment": "Express delivery needed",
    "externalDistributionOrderId": "DO-14534",
    "externalRowId": "21020",
    "fromWarehouseExternalId": "central",
    "id": 42,
    "key": "7340192703345",
    "label": "DO-14534",
    "orderDate": "2021-07-19T14:05:22.257Z",
    "orderType": "Transfer",
    "quantity": 4,
    "season": "Spring/Summer",
    "shippedAt": "2021-07-19T14:05:22.257Z",
    "sku": "123456-001-43",
    "status": "CANCELLED",
    "toWarehouseExternalId": "store1"
  }
]
Response examples (200)
[
  {
    "message": "Missing BrandName",
    "reference": "123456-001-43",
    "referenceField": "key",
    "statusCode": 400
  }
]
Response examples (default)
{
  "error": "Error Type (if any)",
  "message": "Message describing the error",
  "statusCode": 400
}