# The price object

A price object is returned as part of the response body of each successful list, retrieve, create or update API call to the `/api/prices` endpoint.

## Fields

| Field                                         | Type       | Description                                                                                                                                                                                         |
| --------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **type**                                      | `string`   | `prices`                                                                                                                                                                                            |
| **id**                                        | `string`   | The price unique identifier                                                                                                                                                                         |
| links.**self**                                | `string`   | The price endpoint URL                                                                                                                                                                              |
| attributes.**currency\_code**                 | `string`   | The international 3-letter currency code as defined by the ISO 4217 standard, inherited from the associated price list.                                                                             |
| attributes.**sku\_code**                      | `string`   | The code of the associated SKU. When creating a price, either a valid sku\_code or a SKU relationship must be present.                                                                              |
| attributes.**amount\_cents**                  | `integer`  | The SKU price amount for the associated price list, in cents.                                                                                                                                       |
| attributes.**amount\_float**                  | `float`    | The SKU price amount for the associated price list, float.                                                                                                                                          |
| attributes.**formatted\_amount**              | `string`   | The SKU price amount for the associated price list, formatted.                                                                                                                                      |
| attributes.**original\_amount\_cents**        | `integer`  | The SKU price amount for the associated price list, in cents before any applied rule.                                                                                                               |
| attributes.**formatted\_original\_amount**    | `string`   | The SKU price amount for the associated price list, in cents before any applied rule, formatted.                                                                                                    |
| attributes.**compare\_at\_amount\_cents**     | `integer`  | The compared price amount, in cents. Useful to display a percentage discount.                                                                                                                       |
| attributes.**compare\_at\_amount\_float**     | `float`    | The compared price amount, float.                                                                                                                                                                   |
| attributes.**formatted\_compare\_at\_amount** | `string`   | The compared price amount, formatted.                                                                                                                                                               |
| attributes.**rule\_outcomes**                 | `object`   | The rule outcomes.                                                                                                                                                                                  |
| attributes.**processed\_at**                  | `datetime` | Time at which the resource was processed by API.                                                                                                                                                    |
| attributes.**created\_at**                    | `datetime` | Time at which the resource was created.                                                                                                                                                             |
| attributes.**updated\_at**                    | `datetime` | Time at which the resource was last updated.                                                                                                                                                        |
| attributes.**reference**                      | `string`   | A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. |
| attributes.**reference\_origin**              | `string`   | Any identifier of the third party system that defines the reference code.                                                                                                                           |
| attributes.**rules**                          | `object`   | The rules (using Rules Engine) to be applied.                                                                                                                                                       |
| attributes.**resource\_payload**              | `object`   | The payload used to evaluate the rules.                                                                                                                                                             |
| attributes.**jwt\_custom\_claim**             | `object`   | The custom\_claim attached to the current JWT (if any).                                                                                                                                             |
| attributes.**metadata**                       | `object`   | Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format.                                        |
| relationships.**price\_list**                 | `object`   | The associated price list.                                                                                                                                                                          |
| relationships.**sku**                         | `object`   | The associated SKU. When creating a price, either a SKU relationship or a valid sku\_code must be present.                                                                                          |
| relationships.**price\_tiers**                | `array`    | The associated price tiers.                                                                                                                                                                         |
| relationships.**price\_volume\_tiers**        | `array`    | The associated price volume tiers.                                                                                                                                                                  |
| relationships.**price\_frequency\_tiers**     | `array`    | The associated price frequency tiers.                                                                                                                                                               |
| relationships.**attachments**                 | `array`    | The associated attachments.                                                                                                                                                                         |
| relationships.**versions**                    | `array`    | The associated changes.                                                                                                                                                                             |
| relationships.**jwt\_customer**               | `object`   | The customer associated to the JWT.                                                                                                                                                                 |
| relationships.**jwt\_markets**                | `array`    | The markets associated to the JWT.                                                                                                                                                                  |
| relationships.**jwt\_stock\_locations**       | `array`    | The stock locations associated to the JWT.                                                                                                                                                          |
| relationships.**event\_stores**               | `array`    | The associated event stores.                                                                                                                                                                        |
| meta.**mode**                                 | `string`   | The resource environment (can be one of `test` or `live`)                                                                                                                                           |
