Update an invoice item

Updates an invoice item.

SecurityAPI Key: SecretApiKey or HTTP: JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

itemId
required
string

ID of the invoice item.

Request Body schema: application/json

Invoice item resource.

type
required
string

Type of invoice item.

Enum: "debit" "credit"
description
string <= 1000 characters

Description of the invoice item.

unitPrice
required
number <double>

Unit price of the invoice item.

quantity
integer

Quantity of the invoice item.

productId
string or null <= 50 characters

ID of the product.

periodStartTime
string or null <date-time>

Date and time when the billing period starts.

periodEndTime
string or null <date-time>

Date and time when the billing period ends.

periodNumber
integer or null

Billing period number that is associated with the invoice item. For example, an invoice item for a service is included in billing period number 3. The invoice item is only applied to billing period number 3.

put
/invoices/{id}/items/{itemId}
Request samples
application/json
{ "type": "debit", "description": "string", "unitPrice": 0.1, "quantity": 0, "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "periodStartTime": "2019-08-24T14:15:22Z", "periodEndTime": "2019-08-24T14:15:22Z", "periodNumber": 0, "tax": { "amount": 0.1, "description": "string" } }
Responses

200

Invoice item updated.

Response Schema: application/json
id
string <= 50 characters

ID of the invoice item.

type
required
string

Type of invoice item.

Enum: "debit" "credit"
description
string <= 1000 characters

Description of the invoice item.

unitPrice
required
number <double>

Unit price of the invoice item.

quantity
integer

Quantity of the invoice item.

price
number <double>

Total price of the invoice item.

productId
string or null <= 50 characters

ID of the product.

planId
string or null <= 50 characters

ID of the plan.

subscriptionId
string or null <= 50 characters

ID of the order.

discountAmount
number <double>

Discount amount applied to the invoice item.

periodStartTime
string or null <date-time>

Date and time when the billing period starts.

periodEndTime
string or null <date-time>

Date and time when the billing period ends.

periodNumber
integer or null

Billing period number that is associated with the invoice item. For example, an invoice item for a service is included in billing period number 3. The invoice item is only applied to billing period number 3.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

TaxItem (object) or null

Invoice item tax.

Array of objects

Related links.

object

Embedded objects that are requested by the expand query parameter.

401

Unauthorized access. Invalid credentials used.

422

Invalid data sent.

Response samples
application/json
{ "id": "ii_0YVFDEQS2KCFTBN9HXWJFY55GV", "type": "debit", "description": "string", "unitPrice": 0.1, "quantity": 0, "price": 0.1, "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "subscriptionId": "ord_01GYJPRKHBD6ZYHH897QCJMBS4", "discountAmount": 0.1, "periodStartTime": "2019-08-24T14:15:22Z", "periodEndTime": "2019-08-24T14:15:22Z", "periodNumber": 0, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "tax": { "amount": 0.1, "description": "string", "rate": 0, "stateAmount": 0.94, "countyAmount": 0.04, "cityAmount": 0, "specialDistrictAmount": 0.38, "stateRate": 0, "countyRate": 0, "cityRate": 0, "specialDistrictRate": 0, }, "_links": [ ], "_embedded": { "product": { }, "plan": { } } }