Skip to content

Latest commit

 

History

History
129 lines (82 loc) · 3.21 KB

README.md

File metadata and controls

129 lines (82 loc) · 3.21 KB

Refunds

(refunds)

Overview

Refunds are reimbursements for successfully created but unused shipping labels or other charges.

Available Operations

  • create - Create a refund
  • list - List all refunds
  • get - Retrieve a refund

create

Creates a new refund object.

Example Usage

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

Parameters

Parameter Type Required Description Example
transaction str ✔️ N/A 915d94940ea54c3a80cbfa328722f5a1
async_ Optional[bool] N/A false

Response

components.Refund

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

list

Returns a list all refund objects.

Example Usage

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

Response

components.RefundPaginatedList

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get

Returns an existing rate using a rate object ID.

Example Usage

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

Parameters

Parameter Type Required Description
refund_id str ✔️ Object ID of the refund to update

Response

components.Refund

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*