Skip to main content
POST
/
offers
/
create-offer
/
v1
Create an offer
curl --request POST \
  --url https://api.collectpure.com/offers/create-offer/v1 \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quantity": 4503599627370496,
  "type": "fixed_pricing",
  "expiresAt": "2023-11-07T05:31:56Z",
  "price": 4503599627370495,
  "premiumPercent": 1,
  "premiumDollar": 4503599627370495,
  "buyerNotes": "<string>",
  "active": true,
  "maxSpotPrice": 4503599627370495,
  "minSpotPrice": 4503599627370495
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "price": 0,
    "updatedAt": "<string>",
    "expiresAt": "<string>",
    "quantity": 0,
    "buyerNotes": "<string>",
    "createdAt": "<string>",
    "premiumPercent": -0.5,
    "type": "fixed_pricing",
    "premiumDollar": 0,
    "spotPremium": -0.5,
    "active": true,
    "spotPremiumDollar": 0,
    "maxSpotPrice": 0,
    "minSpotPrice": 0
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication

Body

application/json
productId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
variantId
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
quantity
integer
required
Required range: 1 <= x <= 9007199254740991
type
enum<string>
required
Available options:
fixed_pricing,
premium_percentage_pricing,
premium_dollar_pricing
expiresAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
price
integer | null

Price in cents. Required for fixed_pricing type

Required range: 0 < x <= 9007199254740991
premiumPercent
number
Required range: x >= 0
premiumDollar
integer

Premium in cents

Required range: 0 <= x <= 9007199254740991
buyerNotes
string
Maximum string length: 500
active
boolean
maxSpotPrice
integer | null

Max spot price in cents

Required range: 0 < x <= 9007199254740991
minSpotPrice
integer | null

Min spot price in cents

Required range: 0 < x <= 9007199254740991

Response

200 - application/json

Default Response

success
boolean
required
data
object
required