Products

A product describes what you sell (goods or services). A product determines how what you sell appears on invoices and receipts. The pricing for products is set in Plans. One product can have many plans.

Retrieve a list of products

Retrieve a list of products.

SecuritySecretApiKey or JWT
Request
query Parameters
filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

q
string

The partial search of the text fields.

Responses
200

A list of products was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
name
required
string <= 255 characters

The product name.

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

unitLabel
string <= 50 characters
Default: "unit"

The unit label, such as per seat or per unit.

description
string <= 512 characters

The product description.

requiresShipping
boolean

If the product requires shipping, shipping calculations will be applied.

options
Array of strings

The product options such as color, size, etc. The product options definition does not include option values. Those are defined within the plans.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of SelfLink (object) non-empty

The links related to resource.

Array (non-empty)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/products
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/storefront/products?filter=string&sort=string&limit=1000&offset=0&q=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Retrieve a product

Retrieve a product with specified ID.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

Responses
200

Product was retrieved successfully.

Response Schema: application/json
name
required
string <= 255 characters

The product name.

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

unitLabel
string <= 50 characters
Default: "unit"

The unit label, such as per seat or per unit.

description
string <= 512 characters

The product description.

requiresShipping
boolean

If the product requires shipping, shipping calculations will be applied.

options
Array of strings

The product options such as color, size, etc. The product options definition does not include option values. Those are defined within the plans.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of SelfLink (object) non-empty

The links related to resource.

Array (non-empty)
Any of:
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/products/{id}
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/storefront/products/{id}' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "membership",
  • "name": "Premium membership",
  • "unitLabel": "seat",
  • "description": "string",
  • "requiresShipping": false,
  • "options": [
    ],
  • "customFields": {
    },
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}