Shipments

Note

api.shipments retains three non-job-scoped methods as canonical: get_shipment (GET /shipment), get_global_accessorials (GET /shipment/accessorials), and get_shipment_document (GET /shipment/document/{docId}).

The 11 job-scoped methods (get_rate_quotes, book, accessorials, etc.) are deprecation shims that forward to ab.api.endpoints.jobs.shipment.JobShipmentEndpoint (api.jobs.shipment).

class ab.api.endpoints.shipments.ShipmentsEndpoint(client)[source]

Non-job-scoped shipment operations (ACPortal API).

The job-scoped methods live at api.jobs.shipment; they remain here only as deprecation shims.

get_shipment(*, franchisee_id=None, provider_id=None, pro_number=None)[source]

GET /shipment

Docs: https://ab-sdk.readthedocs.io/en/latest/api/shipments/get_shipment.html Query params: ShipmentParams Response model: ShipmentInfo

Parameters:
  • franchisee_id (str | None)

  • provider_id (str | None)

  • pro_number (str | None)

Return type:

ShipmentInfo

get_global_accessorials()[source]

GET /shipment/accessorials

Docs: https://ab-sdk.readthedocs.io/en/latest/api/shipments/get_global_accessorials.html Response model: List[GlobalAccessorial]

Return type:

list[GlobalAccessorial]

get_shipment_document(doc_id)[source]

GET /shipment/document/{docId}

Docs: https://ab-sdk.readthedocs.io/en/latest/api/shipments/get_shipment_document.html Query params: ShipmentDocumentParams

Parameters:

doc_id (str)

Return type:

bytes

get_rate_quotes(job_display_id)[source]

Deprecated. Use api.jobs.shipment.get_rate_quotes(...).

Parameters:

job_display_id (int)

Return type:

list[RateQuote]

request_rate_quotes(job_display_id, *, data)[source]

Deprecated. Use api.jobs.shipment.request_rate_quotes(...).

Parameters:
Return type:

list[RateQuote]

book(job_display_id, *, data)[source]

Deprecated. Use api.jobs.shipment.book(...).

Parameters:
Return type:

ServiceBaseResponse

delete_shipment(job_display_id)[source]

Deprecated. Use api.jobs.shipment.delete(...).

Parameters:

job_display_id (int)

Return type:

ServiceBaseResponse

get_accessorials(job_display_id)[source]

Deprecated. Use api.jobs.shipment.get_accessorials(...).

Parameters:

job_display_id (int)

Return type:

list[Accessorial]

add_accessorial(job_display_id, *, data)[source]

Deprecated. Use api.jobs.shipment.add_accessorial(...).

Parameters:
Return type:

ServiceBaseResponse

remove_accessorial(job_display_id, add_on_id)[source]

Deprecated. Use api.jobs.shipment.remove_accessorial(...).

Parameters:
  • job_display_id (int)

  • add_on_id (str)

Return type:

ServiceBaseResponse

get_origin_destination(job_display_id)[source]

Deprecated. Use api.jobs.shipment.get_origin_destination(...).

Parameters:

job_display_id (int)

Return type:

ShipmentOriginDestination

get_export_data(job_display_id)[source]

Deprecated. Use api.jobs.shipment.get_export_data(...).

Parameters:

job_display_id (int)

Return type:

ShipmentExportData

post_export_data(job_display_id, *, data)[source]

Deprecated. Use api.jobs.shipment.post_export_data(...).

Parameters:
Return type:

ServiceBaseResponse

get_rates_state(job_display_id)[source]

Deprecated. Use api.jobs.shipment.get_rates_state(...).

Parameters:

job_display_id (int)

Return type:

RatesState

delete(job_display_id)[source]

Legacy alias of delete_shipment().

Parameters:

job_display_id (int)

Return type:

ServiceBaseResponse

get_origin_dest(job_display_id)[source]

Legacy alias of get_origin_destination().

Parameters:

job_display_id (int)

Return type:

ShipmentOriginDestination

Per-endpoint reference

Each route-backed method has its own page rendering the HTTP route, the Python and CLI call signatures, and the request/response model field tables. This is the page help(api.shipments.<method>) links to via its Docs: footer. These pages are generated by scripts/generate_endpoint_docs.py and kept current by a CI freshness gate.

Methods

get_rate_quotes

GET /job/{jobDisplayId}/shipment/ratequotes — Get rate quotes for a job shipment.

Returns: list[RateQuote]`

quotes = api.shipments.get_rate_quotes(job_display_id)

book

POST /job/{jobDisplayId}/shipment/book — Book a shipment.

Returns: ServiceBaseResponse

delete_shipment

DELETE /job/{jobDisplayId}/shipment — Delete a shipment.

Returns: ServiceBaseResponse

add_accessorial / remove_accessorial

POST /job/{jobDisplayId}/shipment/accessorial and DELETE .../accessorial/{addOnId} — Manage accessorial charges.

Returns: ServiceBaseResponse

get_export_data / post_export_data

GET/POST /job/{jobDisplayId}/shipment/exportdata — Shipment export data operations.

Returns: ShipmentExportData