Rentals
Update a rental
Admin API
Conditions
TimelineComments
Rentals
Update a rental
Update details about a rental - either edits or despatch/return information. Merchants may also update the Shopify order/fulfillment at the same time via the Shopify API.
PUT
/
rentals
/
{rental_id}
curl --request PUT \
--url https://app.supercycle.com/api/v1/rentals/{rental_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fulfillAt": "2023-11-07T05:31:56Z",
"fulfilledAt": null,
"itemId": 123,
"minimumRentalEnd": "2023-11-07T05:31:56Z",
"packingStatus": "pending",
"receiveAt": "2023-11-07T05:31:56Z",
"receivedAt": null,
"rentalEnd": {
"before": "2023-11-07T05:31:56Z",
"after": "2023-11-07T05:31:56Z"
},
"rentalStart": {
"before": "2023-11-07T05:31:56Z",
"after": "2023-11-07T05:31:56Z"
}
}'
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"defaultAddress": null,
"email": null,
"firstName": null,
"lastName": null,
"shopifyId": 123
},
"fulfillAt": null,
"fulfilledAt": null,
"itemId": 123,
"minimumRentalEnd": null,
"originRentalIntentToken": null,
"receiveAt": null,
"receivedAt": null,
"rentalStart": null,
"rentalEnd": null,
"restockBy": null,
"restockedAt": null,
"packingStatus": "pending",
"sequentialId": null,
"shopifyOrderName": "<string>",
"shopifyOrderId": 123,
"shopifyOrderLineId": 123,
"status": "scheduled",
"returnOrderId": null,
"timeline_events": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Numeric ID of the rental to retrieve.
Body
application/json
Response
200
application/json
Expected response to a valid request
The response is of type object
.
curl --request PUT \
--url https://app.supercycle.com/api/v1/rentals/{rental_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fulfillAt": "2023-11-07T05:31:56Z",
"fulfilledAt": null,
"itemId": 123,
"minimumRentalEnd": "2023-11-07T05:31:56Z",
"packingStatus": "pending",
"receiveAt": "2023-11-07T05:31:56Z",
"receivedAt": null,
"rentalEnd": {
"before": "2023-11-07T05:31:56Z",
"after": "2023-11-07T05:31:56Z"
},
"rentalStart": {
"before": "2023-11-07T05:31:56Z",
"after": "2023-11-07T05:31:56Z"
}
}'
{
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"customer": {
"id": 123,
"createdAt": "2023-11-07T05:31:56Z",
"defaultAddress": null,
"email": null,
"firstName": null,
"lastName": null,
"shopifyId": 123
},
"fulfillAt": null,
"fulfilledAt": null,
"itemId": 123,
"minimumRentalEnd": null,
"originRentalIntentToken": null,
"receiveAt": null,
"receivedAt": null,
"rentalStart": null,
"rentalEnd": null,
"restockBy": null,
"restockedAt": null,
"packingStatus": "pending",
"sequentialId": null,
"shopifyOrderName": "<string>",
"shopifyOrderId": 123,
"shopifyOrderLineId": 123,
"status": "scheduled",
"returnOrderId": null,
"timeline_events": [
{
"id": 123,
"eventableId": 123,
"eventableType": "<string>",
"eventType": "<string>",
"metadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"author": "<string>"
}
]
}