A list of all methods in the OrderReturnService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
returns_order | Make a return against an order. The maximum amount of the return is the amount of the order |
list_order_return | Retrieve a list of all order returns. |
retrieve_order_return | Retrieve the details of a return. |
Make a return against an order. The maximum amount of the return is the amount of the order
- HTTP Method:
POST
- Endpoint:
/v1/orders/{orderId}/returns
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | OrderIdReturnsBody | ✅ | The request body. |
order_id | str | ✅ | ID of the order. String starting with order_. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_48
Example Usage Code Snippet
from rapyd_sdk import RapydSdk, Environment
from rapyd_sdk.models import OrderIdReturnsBody
sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)
request_body = OrderIdReturnsBody(
order_id="order_id",
items=[
{
"description": "description",
"parent": "parent",
"type_": "sku",
"quantity": 0.94,
"currency": "currency",
"amount": 9.08,
"order_id": "order_id"
}
]
)
result = sdk.order_return.returns_order(
request_body=request_body,
order_id="orderId",
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)
Retrieve a list of all order returns.
- HTTP Method:
GET
- Endpoint:
/v1/order_returns
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
limit | str | ❌ | The maximum number of returns to list. Range - 1-100. Default is 10. |
ending_before | str | ❌ | The ID of the order created after the last order you want to retrieve a return from. |
starting_after | str | ❌ | The ID of the order created before the first order you want to retrieve a return from. |
tokens | List[str] | ❌ | Filters the list for orders related to the specified order. |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_49
Example Usage Code Snippet
from rapyd_sdk import RapydSdk, Environment
sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)
tokens=[
"tokens"
]
result = sdk.order_return.list_order_return(
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
limit="limit",
ending_before="ending_before",
starting_after="starting_after",
tokens=tokens,
idempotency="idempotency"
)
print(result)
Retrieve the details of a return.
- HTTP Method:
GET
- Endpoint:
/v1/order_returns/{orderReturnsId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
order_returns_id | str | ✅ | ID of the return. String starting with orre_. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_48
Example Usage Code Snippet
from rapyd_sdk import RapydSdk, Environment
sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.order_return.retrieve_order_return(
order_returns_id="orderReturnsId",
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)