Create multiple sales. This will upsert
- application/json
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[]
Responses
- 200
- 400
- application/json
- Schema
- Example (from schema)
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
{
"id": "1",
"lookback": 6,
"status": "processing",
"successes": "1",
"errors": "1"
}
Validation error in request, details can be found in the body of the response
POST /sales/batches
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"
}
]
}
]
}'
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"
}
]
}
]
}'
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"
}
]
}
]
}'
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"
}
]
}
]
}'
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"
}
]
}
]
}'