Skip to main content

Create multiple sales. This will upsert

Request Body
  • lookback integer required

    Possible values: >= 1 and <= 60

    How far do you want us to look back for call data to match against your sales? For example: if this is set to 6, then we'd be looking at calls in the previous 6 months to match to your uploaded sales.

  • sales object[]
  • id string

    The sale ID

  • description string

    Description

  • date string required

    The date of the sale. Formatted as ISO 8601 without time.

  • value string

    The value of the sale

  • mhid string required

    The MHID to match against

  • clis string[] required
  • properties object[]
  • key integer

    The key of the property

  • value string

    The value of the property

Responses


Schema
  • id integer

    The batch ID

  • lookback integer

    Possible values: >= 1 and <= 60

    This is the number of months to look back to when matching calls to your sales.

  • status string

    processing|complete|failed

  • successes integer

    The qty of successful matches

  • errors integer

    The qty of failed matches

POST /sales/batches
Body
{
"lookback": 6,
"sales": [
{
"id": "ABC123",
"description": "1 x Box of stuff",
"date": "2022-10-01",
"value": "100",
"mhid": "DJGHF345",
"clis": [
"441234567890"
],
"properties": [
{
"key": "1",
"value": "JS001"
}
]
}
]
}
curl -L 'https://www.reports.mediahawk.co.uk/rest/v2_0/sales/batches' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"lookback": 6,
"sales": [
{
"id": "ABC123",
"description": "1 x Box of stuff",
"date": "2022-10-01",
"value": "100",
"mhid": "DJGHF345",
"clis": [
"441234567890"
],
"properties": [
{
"key": "1",
"value": "JS001"
}
]
}
]
}'