Create Company Pricing
POST/companies/:lookupKey/:lookupValue/pricing
Use this endpoint to define pricing for an existing company. The company can be identified by it's lookup key. It is required to provide either categories
or products
or both in the payload.
Use cases
A common use case for this endpoint is when you want to give discounts only for a specific company and all contacts in that company. If a contact in that company already has pricing defined, the price set on the parent company will be ignored.
If you want for ex. to give a discount of 20% of sales price on all products in a given category you can use the SP
type pricing for a category. The company will have discounted prices on all products that belong in that category.
Another common use case is to set a specific price for a product only for contacts in a given company.
Request
Path Parameters
Lookup key. Read more about company lookup keys
The value of the key (id or sourceId)
- application/json
Body
Array [
]
Array [
]
categories
object[]
pricing
object
products
object[]
pricing
object
Responses
- 200
- 404
Create Company Pricing - 200
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Company Pricing - 200
Schema
Array [
]
data
object[]
{
"data": [
{
"action": "create",
"key": 1797,
"lookupKey": "id",
"success": true
},
{
"action": "create",
"key": 77138,
"lookupKey": "id",
"success": true
},
{
"action": "create",
"key": 86011,
"lookupKey": "id",
"success": true
}
],
"messages": [
"Completed"
],
"total": 3
}
{
"data": [
{
"action": "create",
"key": 1797,
"lookupKey": "id",
"success": true
},
{
"action": "create",
"key": 77138,
"lookupKey": "id",
"success": true
},
{
"action": "create",
"key": 86011,
"lookupKey": "id",
"success": true
}
],
"messages": [
"Completed"
],
"total": 3
}
Create Company Pricing - 404
Response Headers
Alt-Svc
string
Via
string
alt-svc
string
content-length
string
date
string
return-format
string
x-request-id
string
- application/json
- Schema
- Example (from schema)
- Create Company Pricing - 404
Schema
error
object
{
"error": {
"code": 40007,
"messages": [
"Parent resource [Company] with id [9484] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/20007",
"status": 404,
"type": "ParentCompanyNotFound"
}
}
{
"error": {
"code": 40007,
"messages": [
"Parent resource [Company] with id [9484] not found"
],
"moreInfo": "https://www.propel.us/docs/errors/20007",
"status": 404,
"type": "ParentCompanyNotFound"
}
}