Files
speakeasy-playground/docs/sdks/invoices
Mike Lueders 14c449163c generate sdk
2024-03-01 12:52:50 -06:00
..
2024-03-01 12:52:50 -06:00

Invoices

(invoices)

Overview

Please note that the following endpoints are in beta and API contract is subject to change.

An invoice is a request for payment for Shippo services. It is a collection of invoice items. You can query your invoice at any time to see your current charges. Shippo sends invoices weekly or when your bill has exceeded $100. Shippo Billing FAQs.

Invoice Item

Invoice items are the individual amounts owed to Shippo. They can represent a purchased label or a charge for a service. Invoice items also represent refunds. They are the line items in an invoice.

Available Operations

get_invoice

Endpoint is in beta and API contract is subject to change.

Returns a single invoice using an object ID.

Example Usage

import shippo

s = shippo.Shippo(
    api_key_header="<YOUR_API_KEY_HERE>",
)


res = s.invoices.get_invoice(invoice_object_id='<value>', shippo_api_version='<value>')

if res.invoice is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
invoice_object_id str ✔️ Object ID of the Invoice
shippo_api_version Optional[str] String used to pick a non-default API version to use

Response

operations.GetInvoiceResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

list_invoices

Endpoint is in beta and API contract is subject to change.

Retrieves a collection of invoices that belong to the authenticated user. Date range and invoice status filters can be used to filter the result set. The results are paginated. Please see filtering documentation for more information on date filtering and pagination.

Example Usage

import shippo

s = shippo.Shippo(
    api_key_header="<YOUR_API_KEY_HERE>",
)


res = s.invoices.list_invoices(page=1, results=25, shippo_api_version='<value>')

if res.invoice_list_wrapper is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
page Optional[int] The page number you want to select
results Optional[int] The number of results to return per page (max 100)
shippo_api_version Optional[str] String used to pick a non-default API version to use

Response

operations.ListInvoicesResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

list_invoice_items_template

Endpoint is in beta and API contract is subject to change.

Retrieves a collection of invoice items that belong to the authenticated user. Invoice object ID and object owner object ID can be used to filter the result set. The results are paginated. Please see filtering documentation for more information on date filtering and pagination.

Example Usage

import shippo
from shippo.models import operations

s = shippo.Shippo(
    api_key_header="<YOUR_API_KEY_HERE>",
)

req = operations.ListInvoiceItemsTemplateRequest()

res = s.invoices.list_invoice_items_template(req)

if res.invoice_item_list_wrapper is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request operations.ListInvoiceItemsTemplateRequest ✔️ The request object to use for the request.

Response

operations.ListInvoiceItemsTemplateResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /