Last Updated: May 05, 2016
Creating a new price
The API provides to create a new price.
Request
{ "ItemId": 1, "NormalPrice": 140.55, "DiscountPrice": null, "PriceTypeId": 1 }
HTTP Method | Resource URI |
---|---|
POST | https://{tenantName}.api.xomni.com/private/catalog/price |
Request Body Description
Parameter Name | Description | Type | Conditions |
---|---|---|---|
ItemId | Unique ID of the item. | Number |
Required
|
NormalPrice | Regular price of the item. | Number | |
DiscountPrice | Discount price of the item. | Number | |
PriceTypeId | The unique ID of the price type used to define the price. | Number |
Request Headers
Header Field Name | Description |
---|---|
Content-Type |
Content type of the response entity. The value of this header is always application/json.
|
Authorization |
Access or identity token taken from oauth APIs.
Sample: Bearer dc8f1dcdbe454da8a25621839a93569337522968019e4bd7becd6e01285444da
|
Accept |
Includes minor version header.
Sample: application/vnd.xomni.api-v4-1, */*
|
Response
{ "PriceId": 1, "ItemId": 1, "NormalPrice": 140.55, "DiscountPrice": null, "PriceTypeSymbol": "$", "PriceTypeId": 1 }
Response Body Description
Parameter Name | Description | Type |
---|---|---|
PriceId | Unique ID of the price. | Number |
ItemId | Unique ID of the item. | Number |
NormalPrice | Regular price of the item. | Number |
DiscountPrice | Discount price of the item. | Number |
PriceTypeSymbol | The code of the price type used to define the price. | String |
PriceTypeId | The unique ID of the price type used to define the price. | Number |
Response Headers
Header Field Name | Description |
---|---|
Content-Type |
Content type of the response entity. The value of this header is always application/json.
|
Status Codes
A successful operation returns status code 200 (OK) for POST operations. Possible response status codes are as listed below:
Status Code | Description |
---|---|
400 (Bad Request) | Invalid currency id or item id. |
409 (Conflict) | Specified item has price in same currency. |