Skip to main content

New API Endpoints for Counter Offer Management

We are introducing new public API endpoints for managing counter offers. Shippers can now create and cancel counter offers programmatically through the Shipper API.

This addresses the current limitation where these operations were only available via the Shipper TMS Web Application.

We have introduced the following features:

  1. New Endpoint to Create a Counter Offer: Shippers can now programmatically submit a counter offer for a specific order request.

    • Endpoint: POST ${SHIPPER_API_URL}/v1/public/orders/{orderGuid}/requests/{requestGuid}/counter-offer
    • Request Body:
      {
      "price": 100.50
      }
    • Responses:
      • Success (HTTP 200 OK): Indicates the counter offer was successfully created with a pending status.
        {
        "status": "success",
        "data": {
        "object": {
        "is_active": true,
        "created_at": "2019-11-15T10:33:29.112+0000",
        "changed_at": "2019-11-15T10:33:29.112+0000",
        "guid": "4f797316-63a8-432a-a4ef-2986b8occ89d",
        "status": "pending",
        // ... other fields
        }
        }
        }
      • Existing Counter Offer (HTTP 409 Conflict): Returned if a counter offer already exists for the request.
        {
        "status": "fail",
        "data": {
        "message": "Only pending load request can be accepted",
        "error_id": "LOAD_REQUEST_ACCEPT_ERROR",
        "details": null
        }
        }
      • Validation Errors (HTTP 400 Bad Request): Returned if the request body fails validation (e.g., invalid price).
        {
        "status": "fail",
        "data": {
        "message": "Price can't be empty",
        "error_id": "VALIDATION_ERROR",
        "details": {
        "price": ["Price should be a positive number", "Price should be a well-formed decimal number with maximum 2 digits as a fraction"]
        }
        }
        }

    Refer to the "Send a counter offer to the load request" section in the Shipper API documentation for full details.

  2. New Endpoint to Cancel a Counter Offer: This endpoint allows shippers to cancel an existing active counter offer for a specified order request.

    • Endpoint: PATCH ${SHIPPER_API_URL}/v1/public//orders/{orderGuid}/requests/{requestGuid}/counter-offer/cancel
    • Responses:
      • Success (HTTP 200 OK): Indicates the counter offer was successfully found and its status updated to cancelled.
        {
        "status": "success",
        "data": {
        "object": {
        "is_active": true, // Note: is_active might become false after cancellation, depending on logic
        "created_at": "2019-11-15T10:33:29.112+0000",
        "changed_at": "2019-11-15T10:33:29.112+0000", // This would update
        "guid": "4f797316-63a8-432a-a4ef-2986b8occ89d",
        "status": "cancelled",
        // ... other fields
        }
        }
        }
      • Counter Offer Not Found (HTTP 404 Not Found): Returned if no active counter offer exists for the specified request.
        {
        "status": "fail",
        "data": {
        "message": "Offer not found.",
        "error_id": "COUNTER_OFFER_NOT_FOUND_ERROR",
        "details": null
        }
        }

    Refer to the "Cancel a counter offer for the load request" section in the Shipper API documentation for full details.

We believe these new API endpoints will significantly improve the flexibility and efficiency of managing counter offers for our shippers. Please review the updated Shipper API documentation for comprehensive details on implementation and usage.