Partner Schedules

Partner schedules represent invoicing periods that group transactions (charges) together for billing. Schedules progress through a defined lifecycle from draft to approved.

Schedule Status Values

Value Status Description
1 Draft Schedule is in draft mode
2 Approved Schedule approved

Workflow: Draft → Approved

Endpoints Overview

Method Endpoint Description
GET /v1/schedules Get a page of schedules
GET /v1/schedules/{partnerScheduleId} Get schedule details
POST /v1/schedules/{partnerScheduleId}/exported Update exported info

Get Schedules Page

Retrieve a paginated list of partner schedules.

Endpoint: GET /v1/schedules

Query Parameters

Parameter Type Required Description
PageIndex integer No Page number (default: 1)
PageSize integer No Items per page (default: 25, max: 500)
SearchText string No Filter by search text
PartnerId uuid No Filter by partner ID
CreatedFromUtc datetime No Filter schedules created from this date
CreatedToUtc datetime No Filter schedules created to this date
Status integer No Filter by schedule status (see values above)
IsExported boolean No Filter by exported status

Request Example

curl -X GET "https://api.consignlyhq.com/v1/schedules?PageIndex=1&PageSize=50&PartnerId=550e8400-e29b-41d4-a716-446655449801" \
  -H "Authorization: Bearer ACCESS_TOKEN"

Response Example

{
  "index": 1,
  "total": 25,
  "schedules": [
    {
      "id": "550e8400-e29b-41d4-a716-446655449800",
      "partnerId": "550e8400-e29b-41d4-a716-446655449801",
      "partnerName": "Fast Freight Co",
      "partnerCode": "FFC",
      "date": "2024-01-31",
      "referenceNumber": "INV-2024-001",
      "amountExclTax": 1250.00,
      "status": 2,
      "isExported": false
    },
    {
      "id": "550e8400-e29b-41d4-a716-446655449803",
      "partnerId": "550e8400-e29b-41d4-a716-446655449801",
      "partnerName": "Fast Freight Co",
      "partnerCode": "FFC",
      "date": "2024-02-29",
      "referenceNumber": "INV-2024-002",
      "amountExclTax": 980.50,
      "status": 1,
      "isExported": false
    }
  ]
}

Response Fields

Field Type Description
id uuid Schedule ID
partnerId uuid Partner ID
partnerName string Partner name
partnerCode string Partner code
date date Schedule date
referenceNumber string Schedule reference number
amountExclTax number Total amount excluding tax
status integer Schedule status (see values above)
isExported boolean Whether the schedule has been exported for the current API connection

Get Schedule Details

Retrieve details for a specific schedule, including its transactions.

Endpoint: GET /v1/schedules/{partnerScheduleId}

Path Parameters

Parameter Type Required Description
partnerScheduleId uuid Yes The schedule ID

Request Example

curl -X GET "https://api.consignlyhq.com/v1/schedules/550e8400-e29b-41d4-a716-446655449800" \
  -H "Authorization: Bearer ACCESS_TOKEN"

Response Example

{
  "id": "550e8400-e29b-41d4-a716-446655449800",
  "partner": {
    "id": "550e8400-e29b-41d4-a716-446655449801",
    "name": "Fast Freight Co",
    "code": "FFC"
  },
  "date": "2024-01-31",
  "referenceNumber": "INV-2024-001",
  "description": "January 2024 billing schedule",
  "amountExclTax": 1250.00,
  "isExported": false,
  "transactions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655449810",
      "date": "2024-01-15",
      "type": 1,
      "consignmentId": "550e8400-e29b-41d4-a716-446655449820",
      "consignmentNumber": "CON-2024-001",
      "consignmentReferenceNumber": "PO-98765",
      "chargeTypeId": "550e8400-e29b-41d4-a716-446655449830",
      "chargeTypeName": "Storage",
      "chargeTypeCode": "STORAGE",
      "particulars": "Pallet storage - 10 pallets",
      "revenueAccountId": "550e8400-e29b-41d4-a716-446655449840",
      "revenueAccountCode": "REV-001",
      "costCentreId": "550e8400-e29b-41d4-a716-446655449850",
      "costCentreCode": "CC-WH01",
      "quantity": 10,
      "chargeRateExclTax": 25.00,
      "baseChargeExclTax": null,
      "minChargeExclTax": null,
      "maxChargeExclTax": null,
      "chargeApplication": 2,
      "taxRateId": "550e8400-e29b-41d4-a716-446655449860",
      "taxRateName": "GST 15%",
      "taxRatePercent": 15.0,
      "amountExclTax": 250.00
    }
  ]
}

Detail Response Fields

Field Type Description
id uuid Schedule ID
partner object Partner details (id, name, code)
date date Schedule date
referenceNumber string Schedule reference number
description string Schedule description
amountExclTax number Total amount excluding tax
isExported boolean Whether exported for current API connection
transactions array Transaction line items

Transaction Fields

Field Type Description
id uuid Transaction ID
date date Transaction date
type integer Transaction type
consignmentId uuid Associated consignment ID
consignmentNumber string Consignment number
consignmentReferenceNumber string Consignment reference number
chargeTypeId uuid Charge type ID
chargeTypeName string Charge type name
chargeTypeCode string Charge type code
particulars string Transaction particulars
revenueAccountId uuid Revenue account ID
revenueAccountCode string Revenue account code
costCentreId uuid Cost centre ID
costCentreCode string Cost centre code
activityCode string Activity code
activityName string Activity name
quantity number Quantity
chargeRateExclTax number Charge rate excluding tax
baseChargeExclTax number Base charge excluding tax
minChargeExclTax number Minimum charge excluding tax
maxChargeExclTax number Maximum charge excluding tax
chargeApplication integer Charge application type
taxRateId uuid Tax rate ID
taxRateName string Tax rate name
taxRatePercent number Tax rate percentage
amountExclTax number Transaction amount excluding tax

Update Exported Info

Create or update the exported information for a schedule. This marks the schedule as exported for the current API connection and optionally stores a link to the external system.

Endpoint: POST /v1/schedules/{partnerScheduleId}/exported

Path Parameters

Parameter Type Required Description
partnerScheduleId uuid Yes The schedule ID

Request Body

{
  "externalUrl": "https://accounting.example.com/invoices/INV-2024-001"
}

Request Body Fields

Field Type Required Description
externalUrl string No URL to the exported schedule in the external system

Request Example

curl -X POST "https://api.consignlyhq.com/v1/schedules/550e8400-e29b-41d4-a716-446655449800/exported" \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"externalUrl": "https://accounting.example.com/invoices/INV-2024-001"}'

Response

Status: 200 OK