Update an invoice item

Update an invoice item.

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

The resource identifier string.

itemId
required
string

The invoice item ID.

Request Body schema: application/json

InvoiceItem resource.

type
required
string

Invoice item's type.

Enum: "debit" "credit"
unitPrice
required
number <double>

Invoice item's price.

description
string

Invoice item's description.

quantity
integer

Invoice item's quantity.

productId
string <= 50 characters

The product's ID.

periodStartTime
string <date-time>

Start time.

periodEndTime
string <date-time>

End time.

periodNumber
integer

Invoice item subscription order period number.

Responses
200

InvoiceItem was updated.

Response Schema: application/json
type
required
string

Invoice item's type.

Enum: "debit" "credit"
unitPrice
required
number <double>

Invoice item's price.

id
string <= 50 characters

The website identifier string.

description
string

Invoice item's description.

quantity
integer

Invoice item's quantity.

price
number <double>

Invoice item's total price.

productId
string <= 50 characters

The product's ID.

discountAmount
number <double>

Invoice item discount amount.

periodStartTime
string <date-time>

Start time.

periodEndTime
string <date-time>

End time.

periodNumber
integer

Invoice item subscription order period number.

createdTime
string <date-time>

Invoice item created time.

updatedTime
string <date-time> (UpdatedTime)

Read-only timestamp updates when the resource is updated.

object

Invoice item tax.

amount
required
number <double>

Tax amount.

description
required
string

Tax description.

rate
number or null <double>

Tax rate.

stateAmount
number or null <double>

Amount of sales tax to collect for the state.

countyAmount
number or null <double>

Amount of sales tax to collect for the county.

cityAmount
number or null <double>

Amount of sales tax to collect for the city.

specialDistrictAmount
number or null <double>

Amount of sales tax to collect for the special district.

object or null

Jurisdiction names for the invoice.

country
string or null

Two-letter ISO country code for the provided location.

state
string or null

Postal abbreviated state name for the provided location.

county
string or null

County name for the provided location.

city
string or null

City name for the provided location.

Array of Self (object) or ProductLink (object) non-empty

The links related to resource.

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

The link URL.

rel
required
string

The link type.

Value: "self"
Array of ProductEmbed (object) or PlanEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Array (non-empty)
Any of:

Product object.

object (Product)

Products include digital goods, services, and physical goods. Products appear on invoice line items. If you set a tax category identifier, taxes will be calculated upon invoice generation. If it is shippable, shipping will be calculated upon invoice generation. Pricing and variations are set within Plans.

401

Unauthorized access, invalid credentials were used.

422

Invalid data was sent.

put/invoices/{id}/items/{itemId}
Request samples
application/json
{
  • "type": "debit",
  • "description": "string",
  • "unitPrice": 0,
  • "quantity": 0,
  • "productId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "periodStartTime": "2019-08-24T14:15:22Z",
  • "periodEndTime": "2019-08-24T14:15:22Z",
  • "periodNumber": 0
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "debit",
  • "description": "string",
  • "unitPrice": 0,
  • "quantity": 0,
  • "price": 0,
  • "productId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "discountAmount": 0,
  • "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": {
    },
  • "_links": [
    ],
  • "_embedded": [
    ]
}