Update or create a product item (upsert)

Requires the PRODUCT_ITEM.CREATE or PRODUCT_ITEM.UPDATE permission.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

versionstringRequiredDefaults to 1
version

Headers

x-platform-idstringOptional
Platform ID.

Query parameters

identifier_fieldstringOptional
Which field to use to identify whether the resource exists or not
custom_field_referencestringOptional
Which custom field to use to identify whether the resource exists or not
field_actionsmap from strings to stringsOptional
The list of actions for specific fields.

Request

This endpoint expects an object.
product_idstring or nullRequired
The resource ID of the product, that belongs to the product item.
namestring or nullRequiredformat: "^.*$"0-256 characters
referencestringRequiredformat: "^\S+$"0-256 characters
model_typeenum or nullRequired
productobject or nullOptional
descriptionstring or nullOptionalformat: "^.*$"0-256 characters
typeenum or nullOptional
The type of the product item.
usage_basedobjectOptional

Additional settings in case of a USAGE_BASED type.

creditsobjectOptional
Additional settings in case of a CREDITS type.
meter_value_calculationobject or nullOptional
tax_categoryenum or nullOptional
The default tax category applied to the product item.
display_orderinteger or nullOptional
unit_nameobjectOptional
custom_fieldslist of objects or nullOptional
Custom fields associated to this product item
meter_value_calculation_idstring or nullOptionalDeprecated

The linked meter value calculation, in case of a USAGE_BASED charge type.

report_meter_value_calculation_idslist of strings or nullOptionalDeprecated

Optional reporting meter value calculations, in case of a USAGE_BASED charge type.

Response

Created
object_typestring or nullOptionalRead-only
idstring or nullOptionalRead-only
product_idstring or nullOptional
The resource ID of the product, that belongs to the product item.
productobject or nullOptional
namestring or nullOptionalformat: "^.*$"0-256 characters
statusenum or nullOptionalRead-only
referencestringOptionalformat: "^\S+$"0-256 characters
descriptionstring or nullOptionalformat: "^.*$"0-256 characters
typeenum or nullOptional
The type of the product item.
model_typeenum or nullOptional
usage_basedobjectOptional

Additional settings in case of a USAGE_BASED type.

creditsobjectOptional
Additional settings in case of a CREDITS type.
meter_value_calculationobject or nullOptional
tax_categoryenum or nullOptional
The default tax category applied to the product item.
display_orderinteger or nullOptional
unit_nameobjectOptional
custom_fieldslist of objects or nullOptional
Custom fields associated to this product item
customer_idstring or nullOptionalRead-only
meter_value_calculation_idstring or nullOptionalDeprecated

The linked meter value calculation, in case of a USAGE_BASED charge type.

report_meter_value_calculation_idslist of strings or nullOptionalDeprecated

Optional reporting meter value calculations, in case of a USAGE_BASED charge type.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error