Update an invoice item

Request

Updates an invoice item.
Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required
ID of the resource.
itemIdstringrequired
ID of the invoice item.
Bodyapplication/jsonrequired
Invoice item resource.
typestringrequired
Type of invoice item.
Enum:"debit""credit"
descriptionstring, <= 1000 characters
Description of the invoice item.
unitPricenumber, (double)required
Unit price of the invoice item.
quantityinteger
Quantity of the invoice item.
productIdstring or null, <= 50 characters
ID of the product.
Example:"prod_0YV7DES3WPC5J8JD8QTVNZBZNZ"
periodStartTimestring or null, (date-time)
Date and time when the billing period starts.
periodEndTimestring or null, (date-time)
Date and time when the billing period ends.
periodNumberinteger 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.
curl -i -X PUT \
  'https://www.rebilly.com/_mock/catalog/all/invoices/{id}/items/{itemId}' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "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

Invoice item updated.
Headers
Rate-Limit-Limitinteger

Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.

Example:500
Rate-Limit-Remaininginteger

Number of requests still available for this rate limit. For more information, see Rate limits.

Example:499
Bodyapplication/json
idstring, <= 50 charactersread-only
ID of the invoice item.
Example:"ii_0YVFDEQS2KCFTBN9HXWJFY55GV"
typestringrequired
Type of invoice item.
Enum:"debit""credit"
descriptionstring, <= 1000 characters
Description of the invoice item.
unitPricenumber, (double)required
Unit price of the invoice item.
quantityinteger
Quantity of the invoice item.
pricenumber, (double)read-only
Total price of the invoice item.
productIdstring or null, <= 50 characters
ID of the product.
Example:"prod_0YV7DES3WPC5J8JD8QTVNZBZNZ"
planIdstring or null, <= 50 charactersread-only
ID of the plan.
Example:"plan_0YV7DENSVGDBW9S71XZNNYYQ0X"
subscriptionIdstring or null, <= 50 charactersread-only
ID of the order.
Example:"sub_01HRF27SATGE4Z6PBJE6PD8328"
periodStartTimestring or null, (date-time)
Date and time when the billing period starts.
periodEndTimestring or null, (date-time)
Date and time when the billing period ends.
periodNumberinteger 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.
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
taxTaxItem (object) or nullread-only
One of:
Invoice item tax.
_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

Response
{ "id": "ii_0YVFDEQS2KCFTBN9HXWJFY55GV", "type": "debit", "description": "string", "unitPrice": 0.1, "quantity": 0, "price": 0.1, "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "subscriptionId": "sub_01HRF27SATGE4Z6PBJE6PD8328", "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, "jurisdictions": { … } }, "_links": [ { … } ], "_embedded": { "product": {}, "plan": {} } }