(refunds)
Refunds are reimbursements for successfully created but unused shipping labels or other charges.
Creates a new refund object.
import shippo
from shippo.models import components
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.refunds.create(request=components.RefundRequestBody(
transaction='915d94940ea54c3a80cbfa328722f5a1',
async_=False,
))
if res is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
transaction |
str | ✔️ | N/A | 915d94940ea54c3a80cbfa328722f5a1 |
async_ |
Optional[bool] | ➖ | N/A | false |
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |
Returns a list all refund objects.
import shippo
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.refunds.list()
if res is not None:
# handle response
pass
components.RefundPaginatedList
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |
Returns an existing rate using a rate object ID.
import shippo
s = shippo.Shippo(
api_key_header='<YOUR_API_KEY_HERE>',
shippo_api_version='2018-02-08',
)
res = s.refunds.get(refund_id='<value>')
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
refund_id |
str | ✔️ | Object ID of the refund to update |
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |