Skip to main content
POST
/
v1
/
offers
/
{offerId}
/
counter
Counter an offer
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({scope: '<string>', termsRef: '<string>', expiresAt: '2023-11-07T05:31:56Z'})
};

fetch('https://sandbox.api.enfinitos.com/v1/offers/{offerId}/counter', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "ok": true,
  "data": {
    "original": {
      "id": "<string>",
      "fromOrgId": "<string>",
      "toOrgId": "<string>",
      "rightId": "<string>",
      "scope": "<string>",
      "termsRef": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z",
      "derivedRightId": "<string>",
      "contentHash": "<string>",
      "createdAt": "2023-11-07T05:31:56Z"
    },
    "counter": {
      "id": "<string>",
      "fromOrgId": "<string>",
      "toOrgId": "<string>",
      "rightId": "<string>",
      "scope": "<string>",
      "termsRef": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z",
      "derivedRightId": "<string>",
      "contentHash": "<string>",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  },
  "contractVersion": "<string>"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer <api-key>.

Path Parameters

offerId
string
required

Offer id.

Body

application/json
scope
string
required

Revised scope.

Minimum string length: 1
termsRef
string | null

Optional revised terms reference.

expiresAt
string<date-time>

Optional revised expiry; must be in the future.

Response

The original (now COUNTERED) offer and the new counter offer.

ok
boolean
required
data
object
required

Route-specific payload. Operation responses refine this.

contractVersion
string
required
Allowed value: "v1.0"