Updating an item
Last updated
Last updated
Companies can update their existing items by submitting a PATCH request to the Loop API.
The itemId
is used as the unique identifier so it must be supplied correctly in order to update a specific item. Fields that are read only and cannot be updated via the API are: id
, createdAt
, updatedAt.
You can use the GET endpoint to get the item's details, copy/paste the response into the body of the PATCH and change the values you want to update.
The name of the item
The Professional Plan
The amount of the item, denoted in USD. Setting the value to 0 means the item's price is variable rate, and the price will be displayed as "Price varies" on the checkout page
29.99
The frequency with which to charge the item. Valid values: [HOUR, DAY, WEEK, MONTH, YEAR]
WEEK
The frequency count with which to charge the item. Used in combination with frequency e.g. every 2 weeks, every 1 month. A frequency count of 0 denotes a one time payment
2
A hash where the keys are the networkIds and the values are arrays of token addresses for each of the network (see example below). The token addresses will be a subset of the initial tokens accepted as payment specified per network. If omitted, the full list of tokens will be used that was defined when the contract was deployed to a particular network
The ID of the entity. Found on your company dashboard
4d1f3191-935b-40c5-b91e-37e1e3700bac
External subscription ID if applicable. E.g Stripe Subscription ID
orbf9e15-e54b-11ec-b21b-06d24995f946
True means agreements can still be made with this item.
true
Optional details related to the payment amount displayed in the cart on the hosted payment page
Increases to $200 after 2 weeks
Classification of the item. See the GET call to get the most current list
1
The merchant category code (also known as an MCC) ID
10
Defaults to false. If true, then invoices will be automatically generated via the auto-invoicing feature. Delegated signing must be turned on for the entity and an inbound treasury wallet. Please contact Loop (support@loopcrypto.xyz) to have these enabled
false
Specified in days. Says when the first invoice should be created relative to the date/time of the Item's creation
1
The external ID of the item
2a697faf-8fdb-4aab-be20-64db0cef7dd5