Retrieve suitable carrier and service types

POST /openapi/Checkout/GetAvailableCarriersAndServiceTypes — TMS API · Carrier Selection

Returns carriers that comply with your account rules and each carrier's service types (delivery type, time window, price, estimated delivery time) based on a basket's (or return shipment's) origin location, destination address, volumetric/weight, and product information.

  • clientCode and accountCode are required; if salesChannelCode is provided, marketplace-specific carrier settings are also applied.
  • Each baskets item is evaluated as a separate origin location/package group.
  • For return queries, send type: 2 and specify returned shipments with baskets[].shipmentKeys; in this case, the original shipment's volumetric weight is returned in the volumetricWeight field.
  • Returns an empty array if no suitable carriers are found.

İstek gövdesi

  • type (integer): Query type: 1 normal shipment, 2 return shipment.
  • baskets (object[], zorunlu): Baskets/package groups to be evaluated.
    • baskets.weight (number): Total weight (kg).
    • baskets.zipCode (string): Postal code.
    • baskets.latitude (number): Destination latitude.
    • baskets.products (object[]): Products in the basket.
    • baskets.longitude (number): Destination longitude.
    • baskets.toLocation (string[]): Destination address hierarchy: [country, province, district, neighborhood].
    • baskets.totalPrice (number): Basket amount.
    • baskets.customerCode (string): Customer code.
    • baskets.locationCode (string): Origin location (warehouse/store) code.
    • baskets.shipmentKeys (string[]): ShipmentKey values of returned shipments in return queries.
    • baskets.paymentTypeCode (string): Payment type code (see GetPaymentTypes).
    • baskets.volumetricWeight (number): Total volumetric weight.
    • baskets.volumetricWeights (number[]): Volumetric weight list per package.
    • baskets.consignmentSegment (string): Shipment segment.
    • baskets.consignmentSegments (string[]): Shipment segments.
    • baskets.estimatedPackagingCompletionDate (string<date-time>): Estimated packing/shipping time.
  • logSave (boolean): Whether to log the decision record (temporary field).
  • cargoList (string[]): Limits results to these carrier codes.
  • fromLabel (boolean): Indicates the query is made from the label flow.
  • clientCode (string, zorunlu): Organization code.
  • accountCode (string, zorunlu): Account code.
  • customerInfo (object)
    • customerInfo.customerCode (string): Customer's unique code in your system.
    • customerInfo.customerSegmentCode (string): Customer segment code (for segment-based carrier rules).
  • salesChannelCode (string): Sales channel/marketplace code. If provided, must be a valid and active sales channel.
  • showLogInResponse (boolean): If true, returns logTimeLine in the response (temporary field).

Yanıtlar

  • 200: Suitable carriers
  • 400: Organization/account code is incorrect, unauthorized, or account configuration is missing
  • 401: No token, invalid or expired (bodyless response).
  • 429: Request limit exceeded.

200 yanıt alanları

  • carrier (string): Carrier name.
  • isActive (boolean): Is the carrier active.
  • priority (integer): Carrier priority (lower value first).
  • accountId (integer): TMS account ID.
  • carrierId (integer): TMS carrier ID.
  • blacklisted (boolean): Is the carrier blacklisted for this address/customer.
  • carrierCode (string): Carrier code.
  • logTimeLine (object[]): Timeline of decision steps (only if showLogInResponse: true).
  • carrierQuota (integer): Carrier quota.
  • paymentTypes (string[]): Payment type codes accepted by the carrier.
  • serviceTypes (object[]): Suitable service types for this basket by the carrier.
    • serviceTypes.price (number): Price charged to the customer.
    • serviceTypes.priority (integer): Service type priority.
    • serviceTypes.cutOffHour (integer): Cutoff time; service type is valid for orders placed before this time. Empty for system-calculated service types.
    • serviceTypes.carrierCost (number): Carrier cost.
    • serviceTypes.paymentType (string): Payment type name.
    • serviceTypes.deliveryType (string): Delivery type name.
    • serviceTypes.priceCurrency (string): Currency.
    • serviceTypes.paymentTypeCode (string): Payment type code.
    • serviceTypes.deliveryDuration (integer): Estimated delivery time (days).
    • serviceTypes.deliverySlotType (string): Delivery time window name.
    • serviceTypes.deliveryTypeCode (string): Delivery type code (e.g., next day).
    • serviceTypes.deliverySlotTypeCode (string): Delivery time window code.
    • serviceTypes.estimatedDeliveryTime (string<date-time>): Estimated delivery time.
    • serviceTypes.estimatedShippingTime (string<date-time>): Estimated shipping time.
    • serviceTypes.carrierDistanceLookupId (integer): Distance class ID.
  • volumetricWeight (number): Original shipment volumetric weight in return queries.
  • ifDiscountAllowed (boolean): Is discount applicable.
  • consignmentLocation (string[]): Origin location codes from which the shipment can be sent.
  • carrierPerformanceRatio (number): Carrier delivery performance rate.