Skip to content

API Reference

Complete reference for all Automatum API endpoints.

Base URL

https://api.automatum.io/api/v1

Authentication

All endpoints require OAuth 2.0 authentication. See the Authentication Guide for details.

bash
Authorization: Bearer YOUR_ACCESS_TOKEN

Response Format

Success Response

json
{
  "code": 200,
  "data": {
    // Response data
  }
}

Error Response

json
{
  "code": 400,
  "message": "Error description",
  "errors": [
    {
      "field": "fieldName",
      "message": "Field-specific error"
    }
  ]
}

Customers

List Customers

Get a paginated list of customers for your organization.

http
GET /api/v1/customers

Required Scope: read:customers

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, inactive
vendorstringFilter by vendor: aws, azure
searchstringSearch by name or email

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/customers?page=1&limit=20&status=active" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": [
    {
      "id": "cust_1a2b3c4d",
      "organizationId": "org_5e6f7g8h",
      "vendor": "aws",
      "awsAccountId": "123456789012",
      "email": "customer@example.com",
      "companyName": "Acme Corporation",
      "status": "active",
      "createdAt": "2026-01-15T10:00:00Z",
      "updatedAt": "2026-01-16T14:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47,
    "pages": 3
  }
}

Get Customer

Get details for a specific customer.

http
GET /api/v1/customers/:id

Required Scope: read:customers

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/customers/cust_1a2b3c4d" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": {
    "id": "cust_1a2b3c4d",
    "organizationId": "org_5e6f7g8h",
    "vendor": "aws",
    "awsAccountId": "123456789012",
    "email": "customer@example.com",
    "companyName": "Acme Corporation",
    "status": "active",
    "entitlements": [
      {
        "id": "ent_9i0j1k2l",
        "listingId": "listing_3m4n5o6p",
        "status": "active"
      }
    ],
    "createdAt": "2026-01-15T10:00:00Z",
    "updatedAt": "2026-01-16T14:30:00Z"
  }
}

Entitlements

List Entitlements

Get a list of all entitlements for your organization.

http
GET /api/v1/entitlements

Required Scope: read:entitlements

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, expired, cancelled
customerIdstringFilter by customer ID
listingIdstringFilter by listing ID

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/entitlements?status=active" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": [
    {
      "id": "ent_9i0j1k2l",
      "organizationId": "org_5e6f7g8h",
      "customerId": "cust_1a2b3c4d",
      "listingId": "listing_3m4n5o6p",
      "vendor": "aws",
      "status": "active",
      "startDate": "2026-01-01T00:00:00Z",
      "endDate": "2027-01-01T00:00:00Z",
      "dimensions": [
        {
          "key": "users",
          "value": 100
        }
      ],
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-15T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 89,
    "pages": 5
  }
}

Get Entitlement

Get details for a specific entitlement.

http
GET /api/v1/entitlements/:id

Required Scope: read:entitlements

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/entitlements/ent_9i0j1k2l" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": {
    "id": "ent_9i0j1k2l",
    "organizationId": "org_5e6f7g8h",
    "customerId": "cust_1a2b3c4d",
    "listingId": "listing_3m4n5o6p",
    "vendor": "aws",
    "status": "active",
    "startDate": "2026-01-01T00:00:00Z",
    "endDate": "2027-01-01T00:00:00Z",
    "dimensions": [
      {
        "key": "users",
        "value": 100,
        "description": "Number of users"
      }
    ],
    "history": [
      {
        "action": "created",
        "timestamp": "2026-01-01T00:00:00Z"
      },
      {
        "action": "updated",
        "timestamp": "2026-01-15T10:00:00Z",
        "changes": {
          "dimensions.users": { "from": 50, "to": 100 }
        }
      }
    ],
    "createdAt": "2026-01-01T00:00:00Z",
    "updatedAt": "2026-01-15T10:00:00Z"
  }
}

Private Offers

List Private Offers

Get a list of all private offers for your organization.

http
GET /api/v1/private-offers

Required Scope: read:private-offers

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status: draft, created, accepted, expired
vendorstringFilter by vendor: aws, azure
listingIdstringFilter by listing ID

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/private-offers?status=created" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": [
    {
      "id": "offer_7q8r9s0t",
      "organizationId": "org_5e6f7g8h",
      "listingId": "listing_3m4n5o6p",
      "customerId": "cust_1a2b3c4d",
      "vendor": "aws",
      "status": "created",
      "vendorOfferId": "offer-abc123xyz",
      "details": {
        "summary": {
          "offerName": "Q1 2026 Enterprise Deal",
          "companyName": "Acme Corporation"
        },
        "pricing": {
          "discountPercentage": 20,
          "duration": 12
        }
      },
      "createdAt": "2026-01-10T12:00:00Z",
      "updatedAt": "2026-01-10T12:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 34,
    "pages": 2
  }
}

Get Private Offer

Get details for a specific private offer.

http
GET /api/v1/private-offers/:id

Required Scope: read:private-offers

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/private-offers/offer_7q8r9s0t" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": {
    "id": "offer_7q8r9s0t",
    "organizationId": "org_5e6f7g8h",
    "listingId": "listing_3m4n5o6p",
    "customerId": "cust_1a2b3c4d",
    "vendor": "aws",
    "status": "created",
    "vendorOfferId": "offer-abc123xyz",
    "details": {
      "summary": {
        "offerName": "Q1 2026 Enterprise Deal",
        "companyName": "Acme Corporation",
        "buyerNotifications": [
          {
            "name": "John Doe",
            "email": "john.doe@acme.com"
          }
        ]
      },
      "pricing": {
        "discountPercentage": 20,
        "duration": 12,
        "annualValue": 120000
      },
      "aws": {
        "agreementId": "agmt-xyz789",
        "isReplacement": false
      }
    },
    "createdAt": "2026-01-10T12:00:00Z",
    "updatedAt": "2026-01-10T12:00:00Z"
  }
}

Metering

Submit Metering Data

Submit usage metering data to the marketplace.

http
POST /api/v1/metering

Required Scope: write:metering

Request Body:

FieldTypeRequiredDescription
vendorstringYesMarketplace vendor: aws or azure
customerIdstringYesCustomer ID
listingIdstringYesListing ID
dimensionstringYesMetering dimension key
quantitynumberYesUsage quantity (must be positive)
timestampstringYesISO 8601 timestamp
idempotencyKeystringNoUnique key for deduplication

Example Request:

bash
curl -X POST "https://api.automatum.io/api/v1/metering" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "vendor": "aws",
    "customerId": "cust_1a2b3c4d",
    "listingId": "listing_3m4n5o6p",
    "dimension": "api_calls",
    "quantity": 1000,
    "timestamp": "2026-01-16T12:00:00Z",
    "idempotencyKey": "metering_20260116_1200_api_calls"
  }'

Example Response:

json
{
  "code": 200,
  "data": {
    "id": "meter_1u2v3w4x",
    "status": "submitted",
    "vendor": "aws",
    "customerId": "cust_1a2b3c4d",
    "listingId": "listing_3m4n5o6p",
    "dimension": "api_calls",
    "quantity": 1000,
    "timestamp": "2026-01-16T12:00:00Z",
    "meteringRecordId": "mr-aws-abc123",
    "submittedAt": "2026-01-16T12:00:01Z"
  }
}

Analytics

Get Revenue Analytics

Get revenue analytics for your organization.

http
GET /api/v1/analytics/revenue

Required Scope: read:analytics

Query Parameters:

ParameterTypeDescription
startDatestringStart date (ISO 8601)
endDatestringEnd date (ISO 8601)
vendorstringFilter by vendor: aws, azure
listingIdstringFilter by listing ID
groupBystringGroup by: day, week, month, year

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/analytics/revenue?startDate=2026-01-01&endDate=2026-01-31&groupBy=week" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": {
    "total": 450000,
    "currency": "USD",
    "period": {
      "startDate": "2026-01-01",
      "endDate": "2026-01-31"
    },
    "breakdown": [
      {
        "period": "2026-01-01",
        "revenue": 95000,
        "contracts": 12
      },
      {
        "period": "2026-01-08",
        "revenue": 120000,
        "contracts": 15
      },
      {
        "period": "2026-01-15",
        "revenue": 115000,
        "contracts": 14
      },
      {
        "period": "2026-01-22",
        "revenue": 120000,
        "contracts": 16
      }
    ]
  }
}

Get Contract Statistics

Get contract statistics for your organization.

http
GET /api/v1/analytics/contracts

Required Scope: read:analytics

Query Parameters:

ParameterTypeDescription
startDatestringStart date (ISO 8601)
endDatestringEnd date (ISO 8601)
vendorstringFilter by vendor: aws, azure
statusstringFilter by status: active, expired, cancelled

Example Request:

bash
curl -X GET "https://api.automatum.io/api/v1/analytics/contracts" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response:

json
{
  "code": 200,
  "data": {
    "total": 57,
    "active": 42,
    "expiringSoon": 5,
    "expired": 10,
    "byVendor": {
      "aws": 35,
      "azure": 22
    },
    "averageContractValue": 85000,
    "totalContractValue": 3570000
  }
}

Error Codes

CodeStatusDescription
200OKRequest successful
201CreatedResource created successfully
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or expired token
403ForbiddenInsufficient permissions/scope
404Not FoundResource not found or not in your organization
409ConflictResource conflict (e.g., duplicate)
422Unprocessable EntityValid request but cannot be processed
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer error
503Service UnavailableService temporarily unavailable

Rate Limits

See Authentication Guide - Rate Limits for details.

Headers:

http
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 1642334400

Pagination

All list endpoints support pagination:

Request:

http
GET /api/v1/customers?page=2&limit=50

Response:

json
{
  "code": 200,
  "data": [...],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 247,
    "pages": 5,
    "hasNext": true,
    "hasPrevious": true
  }
}

Filtering

Use query parameters to filter results:

http
GET /api/v1/private-offers?status=active&vendor=aws&listingId=listing_abc

Sorting

Sort results using the sort parameter:

http
GET /api/v1/customers?sort=-createdAt,companyName
  • Prefix with - for descending order
  • Multiple fields separated by commas

Idempotency

Use X-Idempotency-Key header to prevent duplicate operations:

bash
curl -X POST "https://api.automatum.io/api/v1/metering" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Idempotency-Key: unique-key-123" \
  -H "Content-Type: application/json" \
  -d '{...}'

Next Steps

Automatum GTM Platform