Skip to main content
PUT
/
invoices
/
{invoiceId}
/
price-update
Update Invoice Prices
curl --request PUT \
  --url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices/{invoiceId}/price-update \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "line_items": [
    {
      "id": 1,
      "line_components": [
        {
          "id": 1,
          "unit_cost": "10",
          "unit_price": "10"
        }
      ]
    },
    {
      "id": 2,
      "line_components": [
        {
          "id": 2,
          "unit_cost": "20",
          "unit_price": "20"
        }
      ]
    }
  ]
}
'
import requests

url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices/{invoiceId}/price-update"

payload = { "line_items": [
{
"id": 1,
"line_components": [
{
"id": 1,
"unit_cost": "10",
"unit_price": "10"
}
]
},
{
"id": 2,
"line_components": [
{
"id": 2,
"unit_cost": "20",
"unit_price": "20"
}
]
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
line_items: [
{id: 1, line_components: [{id: 1, unit_cost: '10', unit_price: '10'}]},
{id: 2, line_components: [{id: 2, unit_cost: '20', unit_price: '20'}]}
]
})
};

fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/invoices/{invoiceId}/price-update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));

Authorizations

x-api-key
string
header
required

Path Parameters

invoiceId
string
required

Body

application/json

The body is of type object.

Response

200 - application/json

Successful response