Offers

Creating a single offer

post
Authorizations
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Body
statusstring · enumRequired

The status of the created offer. At the moment, only offers in the not published status are allowed to be created

Possible values:
typestring · enumRequired

Type of offer (transport/cargo). Also determines the requirements for the request

Possible values:
is_publicbooleanRequired

The offer is published on a public exchange

is_privatebooleanRequired

The offer is published on a private exchange

is_all_private_partnersbooleanOptional

The offer on the private exchange will be received by all partners of the owner company. The field is displayed only in personal offers

private_partnersstring · UUID[]Optional

IDs of partner companies that will receive private offer. The field is displayed only in personal offers

descriptionstringOptional

Additional description in the offer

transportation_requirementall ofOptional

Transportation requirements (for freight offer only)

transportall ofOptional

Transport description (only for transport offer)

Responses
200
Successful execution of the request
application/json
post
POST /public-api/v1/exchange/offer HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
Content-Length: 1127

{
  "status": "not_published",
  "type": "transport",
  "is_public": true,
  "is_private": true,
  "is_all_private_partners": true,
  "private_partners": [
    "text"
  ],
  "description": "text",
  "payment": {
    "quote_is_vat": true,
    "is_prepay": true,
    "bid_is_vat": true,
    "bid_is_no_vat": true,
    "bid_is_not_unique": true,
    "currency": "text",
    "payment_condition": "text",
    "payment_method": "text",
    "bid_mode": "text",
    "quote": 1,
    "extra_quote": 1,
    "quote_mileage": 1,
    "bid_auction_step": 1,
    "vat": 1,
    "mileage_format": "text",
    "prepay_percent": 1,
    "payment_period": 1,
    "bid_confirm_timeframe": 1
  },
  "route": [],
  "cargo_units": [],
  "transportation_requirement": {
    "is_trailer_interchange": true,
    "shipping_mode": "any",
    "type": "any",
    "body": [
      "curtainside"
    ],
    "equipment": [
      "text"
    ],
    "quantity": "text"
  },
  "transport": {
    "is_trailer_interchange": true,
    "type": "any",
    "temperature_min_c": 1,
    "temperature_max_c": 1,
    "available_weight": 1,
    "available_volume": 1,
    "length": 1,
    "width": 1,
    "height": 1,
    "shipping_mode": [
      "any"
    ],
    "adr_class": [
      "no"
    ],
    "body": [],
    "equipment": "text",
    "loading_type": [
      "rear"
    ]
  },
  "publication_lifetime": {
    "lifetime": 1,
    "is_first_bid": true
  },
  "bid_privacy": {
    "allow_view_bidder": true,
    "allow_view_quote": true,
    "allow_view_comment": true
  }
}
{
  "offer": {
    "id": "text",
    "name": "text",
    "type": "cargo",
    "status": "not_published",
    "creation_method": "manual",
    "is_public": true,
    "is_private": true,
    "is_public_duplicate": true,
    "is_partners_selection": true,
    "company_id": "text",
    "description": "text",
    "assignee_users": [],
    "is_autoclosed": true,
    "is_publication_autocanceled": true,
    "publication_autocancel_type": "text",
    "publication_autocancel_at": "Y-m-dTHH:mm:ss.SSSZ",
    "status_changed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "published_at": "Y-m-dTHH:mm:ss.SSSZ",
    "closed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "autoclose_at": "Y-m-dTHH:mm:ss.SSSZ",
    "is_all_private_partners": true,
    "private_partners": [
      "text"
    ],
    "payment": {
      "is_prepay": true,
      "currency": "text",
      "quote_is_vat": true,
      "quote": 1,
      "extra_quote": 1,
      "vat": 1,
      "quote_mileage": 1,
      "prepay_amount": 1,
      "prepay_percent": 1,
      "payment_period": 1,
      "mileage_format": "text",
      "payment_condition": "text",
      "payment_method": "text",
      "bid_mode": "text",
      "bid_is_vat": true,
      "bid_is_no_vat": true,
      "bid_auction_step": 1,
      "bid_is_auto_accept": true,
      "bid_is_not_unique": true,
      "bid_confirm_timeframe": 1,
      "allow_first_bid_no_step": true
    },
    "route": [],
    "route_way": {
      "total_length": 1,
      "total_dur": 1
    },
    "transportation_requirement": {
      "is_trailer_interchange": true,
      "shipping_mode": "any",
      "type": "any",
      "body": [
        "curtainside"
      ],
      "equipment": "text",
      "quantity": "text"
    },
    "cargo_units": [],
    "transport": {
      "is_trailer_interchange": true,
      "type": "any",
      "temperature_min_c": 1,
      "temperature_max_c": 1,
      "available_weight": 1,
      "available_volume": 1,
      "length": 1,
      "width": 1,
      "height": 1,
      "shipping_mode": [
        "any"
      ],
      "adr_class": [
        "no"
      ],
      "body": [],
      "equipment": "text",
      "loading_type": [
        "rear"
      ]
    },
    "publication_lifetime": {
      "is_first_bid": true,
      "lifetime": 1,
      "formatted_lifetime": "text",
      "is_late_bid_prolong": true,
      "prolong_step": 1,
      "formatted_prolong_step": "text",
      "prolong_times": 1
    },
    "bid_privacy": {
      "allow_view_bidder": true,
      "allow_view_quote": true,
      "allow_view_comment": true
    },
    "created_at": "Y-m-dTHH:mm:ss.SSSZ",
    "updated_at": "Y-m-dTHH:mm:ss.SSSZ"
  }
}

This offer creation method allows creating an offer only in the not_published status. To publish an offer on the exchange, update the status of a single offer by unique ID (see below).

Updating the status of a single offer by unique ID

patch
Authorizations
Path parameters
idstringRequired

Unique offer ID

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Body
statusstringOptionalExample: not_published
Responses
200
Successful execution of the request
application/json
Responseobject
patch
PATCH /public-api/v1/exchange/offer/{id}/status HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
Content-Length: 26

{
  "status": "not_published"
}
{}

Deleting a single offer by unique ID

delete
Authorizations
Path parameters
idstringRequired

Unique offer ID

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
204
Successful execution of the request
delete
DELETE /public-api/v1/exchange/offer/{id} HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*

No content

Getting a paginated list of incoming offers on the private exchange

get
Authorizations
Query parameters
limitinteger · min: 1 · max: 50Optional

Limit on the number of offers listed per pagination iteration

Default: 25
offsetintegerOptional

Offset of the paginated selection of offers relative to the previous selection

Default: 0
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Successful execution of the request
application/json
get
GET /public-api/v1/exchange/company/offers/incoming HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "total": 1,
  "count": 1,
  "offers": []
}

Receiving a paginated list of your offers

get
Authorizations
Query parameters
limitinteger · min: 1 · max: 50Optional

Limit on the number of offers listed per pagination iteration

Default: 25
offsetintegerOptional

Offset of the paginated selection of offers relative to the previous selection

Default: 0
offers_statusstring · enumOptional

Select offers of a certain status (except the deleted ones)

Possible values:
offers_typestring · enumOptional

Select offers of a certain type

Possible values:
Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Successful execution of the request
application/json
get
GET /public-api/v1/exchange/company/offers HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "total": 1,
  "count": 1,
  "offers": []
}

Getting an offer by the unique ID

get
Authorizations
Path parameters
idstringRequired

Unique offer ID

Header parameters
Content-Typestring · enumRequiredDefault: application/jsonPossible values:
Accept-Encodingstring · enumRequiredDefault: gzipPossible values:
Responses
200
Successful execution of the request
application/json
get
GET /public-api/v1/exchange/offer/{id} HTTP/1.1
Host: api.test.roolz.tech
Content-Type: application/json
Accept-Encoding: gzip
Accept: */*
{
  "offer": {
    "id": "text",
    "name": "text",
    "type": "cargo",
    "status": "not_published",
    "creation_method": "manual",
    "is_public": true,
    "is_private": true,
    "is_public_duplicate": true,
    "is_partners_selection": true,
    "company_id": "text",
    "description": "text",
    "assignee_users": [],
    "is_autoclosed": true,
    "is_publication_autocanceled": true,
    "publication_autocancel_type": "text",
    "publication_autocancel_at": "Y-m-dTHH:mm:ss.SSSZ",
    "status_changed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "published_at": "Y-m-dTHH:mm:ss.SSSZ",
    "closed_at": "Y-m-dTHH:mm:ss.SSSZ",
    "autoclose_at": "Y-m-dTHH:mm:ss.SSSZ",
    "is_all_private_partners": true,
    "private_partners": [
      "text"
    ],
    "payment": {
      "is_prepay": true,
      "currency": "text",
      "quote_is_vat": true,
      "quote": 1,
      "extra_quote": 1,
      "vat": 1,
      "quote_mileage": 1,
      "prepay_amount": 1,
      "prepay_percent": 1,
      "payment_period": 1,
      "mileage_format": "text",
      "payment_condition": "text",
      "payment_method": "text",
      "bid_mode": "text",
      "bid_is_vat": true,
      "bid_is_no_vat": true,
      "bid_auction_step": 1,
      "bid_is_auto_accept": true,
      "bid_is_not_unique": true,
      "bid_confirm_timeframe": 1,
      "allow_first_bid_no_step": true
    },
    "route": [],
    "route_way": {
      "total_length": 1,
      "total_dur": 1
    },
    "transportation_requirement": {
      "is_trailer_interchange": true,
      "shipping_mode": "any",
      "type": "any",
      "body": [
        "curtainside"
      ],
      "equipment": "text",
      "quantity": "text"
    },
    "cargo_units": [],
    "transport": {
      "is_trailer_interchange": true,
      "type": "any",
      "temperature_min_c": 1,
      "temperature_max_c": 1,
      "available_weight": 1,
      "available_volume": 1,
      "length": 1,
      "width": 1,
      "height": 1,
      "shipping_mode": [
        "any"
      ],
      "adr_class": [
        "no"
      ],
      "body": [],
      "equipment": "text",
      "loading_type": [
        "rear"
      ]
    },
    "publication_lifetime": {
      "is_first_bid": true,
      "lifetime": 1,
      "formatted_lifetime": "text",
      "is_late_bid_prolong": true,
      "prolong_step": 1,
      "formatted_prolong_step": "text",
      "prolong_times": 1
    },
    "bid_privacy": {
      "allow_view_bidder": true,
      "allow_view_quote": true,
      "allow_view_comment": true
    },
    "created_at": "Y-m-dTHH:mm:ss.SSSZ",
    "updated_at": "Y-m-dTHH:mm:ss.SSSZ"
  }
}

Last updated

Was this helpful?