Offers API Reference

Manage product offers, pricing, and offer-related operations in the product catalogue.

Base Path: /api/product-catalogue/offers

Overview

The Offers API provides comprehensive endpoints for managing product offers including creation, pricing, filtering, and bulk operations. All offer endpoints support OData filtering and pagination.

Key Operations


API Endpoints

GET /api/product-catalogue/offers

List All Offers

Gets all offers with OData filtering and pagination.

Authentication

None (publicly accessible)

Query Parameters

Parameter Type Description
$filter string OData filter expression
$orderby string Sort order
$skip integer Skip n records
$top integer Take n records

Response

{
  "value": [
    {
      "id": "offer_123",
      "name": "Cloud Server Premium",
      "vendor": {
        "id": "vendor_1",
        "name": "CloudVendor Inc"
      },
      "price": 299.99,
      "currency": "USD",
      "status": "active",
      "createdAt": "2026-06-02T10:30:00Z"
    }
  ],
  "count": 500
}
GET /api/product-catalogue/offers/{id}

Get Offer by ID

Gets offer details by ID.

Authentication

None

Path Parameters

Parameter Type
id string

Response

{
  "id": "offer_123",
  "name": "Cloud Server Premium",
  "description": "High-performance cloud server",
  "vendor": {
    "id": "vendor_1",
    "name": "CloudVendor Inc"
  },
  "pricing": {
    "basePrice": 299.99,
    "currency": "USD",
    "billingCycle": "monthly"
  },
  "status": "active",
  "createdAt": "2026-06-02T10:30:00Z"
}
GET /api/product-catalogue/offers/vendor/{vendorId}

Get Offers by Vendor

Gets offers by vendor ID.

Authentication

None

Path Parameters

Parameter Type
vendorId string

Response

{
  "vendor": {
    "id": "vendor_1",
    "name": "CloudVendor Inc"
  },
  "offers": [
    {
      "id": "offer_123",
      "name": "Cloud Server Premium",
      "price": 299.99
    }
  ]
}
GET /api/product-catalogue/offers/group/{offerGroupId}

Get Offers by Group

Gets offers by offer group ID.

Authentication

None

Path Parameters

Parameter Type
offerGroupId string

Response

{
  "group": {
    "id": "group_5",
    "name": "Cloud Servers"
  },
  "offers": [
    {
      "id": "offer_123",
      "name": "Cloud Server Premium",
      "price": 299.99
    }
  ]
}
POST /api/product-catalogue/offers

Create Offer

Creates new offer.

Authentication

Bearer Token

Request Body

{
  "name": "New Cloud Service",
  "description": "Advanced cloud service offering",
  "vendorId": "vendor_1",
  "offerGroupId": "group_5",
  "pricing": {
    "basePrice": 499.99,
    "currency": "USD",
    "billingCycle": "monthly"
  },
  "attributes": {
    "vcpu": 8,
    "memory": "32GB",
    "storage": "500GB SSD"
  },
  "status": "active"
}

Response

{
  "id": "offer_125",
  "name": "New Cloud Service",
  "status": "active",
  "createdAt": "2026-06-02T10:30:00Z"
}
PUT /api/product-catalogue/offers/{id}

Update Offer

Updates offer details.

Authentication

Bearer Token

Request Body

{
  "name": "Updated Cloud Service",
  "description": "Updated description",
  "pricing": {
    "basePrice": 599.99,
    "currency": "USD"
  },
  "status": "active"
}

Response

{
  "id": "offer_125",
  "name": "Updated Cloud Service",
  "updatedAt": "2026-06-02T11:00:00Z"
}
DELETE /api/product-catalogue/offers/{id}

Delete Offer

Deletes offer.

Authentication

Bearer Token

Response

{
  "success": true,
  "message": "Offer deleted"
}
POST /api/product-catalogue/offers/import

Import Offers from CSV

Imports offers from CSV file.

Authentication

Bearer Token

Request

Multipart form-data with CSV file

CSV Format

name,vendorId,price,currency,billingCycle,status
Cloud Server Premium,vendor_1,299.99,USD,monthly,active
Cloud Server Standard,vendor_1,99.99,USD,monthly,active

Response

{
  "imported": 2,
  "failed": 0,
  "results": [
    {
      "id": "offer_125",
      "name": "Cloud Server Premium",
      "status": "created"
    }
  ]
}

Error Responses

Code HTTP Status Description
OFFER_NOT_FOUND 404 Offer does not exist
VENDOR_NOT_FOUND 404 Vendor does not exist
INVALID_PRICE 400 Invalid price format
DUPLICATE_OFFER 409 Offer name already exists
INVALID_FILE 400 Invalid CSV file format

Quick Links