Jump to content

API Reference - Deal Offer Link

POST
https://sandbox.treddy.se/deals/v1/deals/{dealId}/offer
Initiate a deal offer on behalf of a buyer.
Generates a offer link which can be completed by the buyer.

Parameters


dealId
string
path

Request


In order to make use of the offer flow, we require the seller information to be present upon deal creation.
Body
{
  "price": 1000,
  "buyer": {
    "name": "Sven Svensson",
    "email": "sven.svensson@gmail.com"
  },
  "buyerRedirectUrl": "https://marknadsplats.se/ads/97c76862-d444-4a5d-a1de-781a6b7cc9cd",
  "sellerRedirectUrl": "https://marknadsplats.se/ads/97c76862-d444-4a5d-a1de-781a6b7cc9cd"
}
Schema
{
  "price": {
    "format": "float",
    "description": "The initial price of the offer displayed to the buyer. Defaults to the article price if omitted.",
    "type": "number",
    "nullable": true
  },
  "buyer": {
    "allOf": [
      {
        "$ref": "#/components/schemas/DealOfferBuyer"
      },
      {
        "description": "The initial buyer name and email displayed to the buyer.",
        "nullable": true
      }
    ]
  },
  "buyerRedirectUrl": {
    "description": "The URL to redirect the buyer to after the offer has been sent.",
    "type": "string",
    "nullable": true
  },
  "sellerRedirectUrl": {
    "description": "The URL to redirect the seller to after the offer has been approved.",
    "type": "string",
    "nullable": true
  }
}

Response body


{
  "url": "https://www.treddy.se/skicka-erbjudande?offer="
}
HTTP STATUS CODE SUMMARY
201 - Successful operation
400 - Bad Request
401 - Not Authorized
403 - Forbidden
404 - Not Found
405 - Invalid Input