Sales History

Sales history is needed to build the relevant revenue distribution model bases on your history. On this page, we’ll dive into the different sales history endpoints you can use to manage your sales history. We'll look at how to upload and update sales history.

The Sales History model

The sales history model contains the storeID, hour, order channel code, sales and transactions amount.

Properties

  • Name
    storeID
    Type
    number
    Description

    Unique identifier of the store structure node.

  • Name
    sales
    Type
    number
    Description

    The amount of sales forecast.

  • Name
    transactions
    Type
    number
    Description

    The amount of transactions forecast.

  • Name
    hour
    Type
    number
    Description

    Start hour of uploading 30 minutes history.

  • Name
    orderChannelsCode
    Type
    number
    Description

    The order channel code.


POST/integrations/salesHistory

Update sales history

This endpoint allows you to upload all your sales history for the day. It replaces all the existing entities with uploaded ones. See the code examples for how to upload your Sales History through ProShedule API.

Required attributes

  • Name
    businessDate
    Type
    Date (YYYY-MM-DD)
    Description

    A business date sales history is uploading for.

  • Name
    body
    Type
    Array<salesHistory>
    Description

    An array of salesHistory objects.

Request

POST
/integrations/salesHistory
curl \
  --location "https://api.proschedule.ambraisoft.com/integrations/salesHistory?businessDate=2024-01-01" \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer {token}" \
  --data-raw '[
    {
      "storeID": "001",
      "sales": 1000,
      "transactions": 50,
      "hour": 12,
      "orderChannelsCode": 0
    },
    {
      "storeID": "001",
      "sales": 1000,
      "transactions": 50,
      "hour": 12.5,
      "orderChannelsCode": 0
    }
  ]'

Response

  {
      "message": "3 revenue history hour(s) uploaded",
      "status": 200
  }

Was this page helpful?