Skip to content

Hostcom Dispatches ​

Read-only. These endpoints expose the history and status of hostcom dispatches. The hostcom write path — staging a file and sending it to stores — is the fan-out hostcom_batch operation. The direct dispatch/apply POST endpoints were removed; all new writes must go through fan-out.


List Hostcom Dispatches ​

GET /v1/hostcom/dispatches

Authentication: OAuth Token (service_account or user)

Permission: rorcex:hostcom-batches.view

Request Query Parameters ​

FieldTypeRequiredDescription
fanout_target_idstringNoAccepts only the literal string "null" — filters results to pre-fan-out legacy dispatches that were not routed through the fan-out framework. Any other value returns 422.
per_pageintegerNoResults per page, 1–200 (default: 50)

Response ​

json
{
  "data": [
    {
      "dispatch_id": "dsp_00000k1L2m3N4o5",
      "apply_mode": "batch",
      "note": "Weekly price change — June week 2",
      "created_at": "2026-06-11T14:35:00Z",
      "applied_at": "2026-06-11T14:37:42Z",
      "target_count": 13,
      "status_rollup": {
        "pending_upload": 0,
        "pending_batch_resolve": 0,
        "pending_apply": 0,
        "applying": 0,
        "polling": 0,
        "completed": 13,
        "errored": 0
      }
    }
  ]
}

Status: 200 OK

FieldTypeDescription
dataarrayList of dispatch summaries
data[].dispatch_idstringUnique hostcom dispatch identifier
data[].apply_modestringApply mode used (batch or immediate)
data[].notestring|nullFree-text annotation
data[].created_atstringISO 8601 creation timestamp
data[].applied_atstring|nullISO 8601 timestamp when the last target reached a terminal state
data[].target_countintegerNumber of store targets in this dispatch
data[].status_rollupobjectCount of targets in each hostcom state machine status

Errors ​

See Errors for shared error envelope format.


Get Hostcom Dispatch ​

Retrieve full detail for a single hostcom dispatch, including per-target state machine status and RORC identifiers.

GET /v1/hostcom/dispatches/{id}

Authentication: OAuth Token (service_account or user)

Permission: rorcex:hostcom-batches.view

Path Parameters ​

ParameterTypeDescription
idstringHostcom dispatch identifier

Response ​

json
{
  "dispatch_id": "dsp_00000k1L2m3N4o5",
  "file_id": "hkx_00000k1L2m3N4o5",
  "apply_mode": "batch",
  "note": "Weekly price change — June week 2",
  "created_at": "2026-06-11T14:35:00Z",
  "applied_at": "2026-06-11T14:37:42Z",
  "targets": [
    {
      "store_org_id": "org_00000k1L2m3N4o5",
      "status": "completed",
      "rorc_file_id": 10042,
      "rorc_batch_id": 20017,
      "rorc_operation_id": 30091,
      "record_count_total": 148,
      "record_count_added": 12,
      "record_count_changed": 135,
      "record_count_deleted": 1,
      "record_count_errored": 0
    }
  ]
}

Status: 200 OK

FieldTypeDescription
dispatch_idstringHostcom dispatch identifier
file_idstringThe staged hostcom file that was dispatched
apply_modestringbatch or immediate
notestring|nullFree-text annotation
created_atstringISO 8601 creation timestamp
applied_atstring|nullISO 8601 completion timestamp
targetsarrayPer-store target records
targets[].store_org_idstringStore organization hashkey
targets[].statusstringHostcom state machine status (see table below)
targets[].rorc_file_idinteger|nullRORC file ID assigned by the lane after upload
targets[].rorc_batch_idinteger|nullRORC batch ID assigned when the batch was resolved
targets[].rorc_operation_idinteger|nullRORC operation ID assigned on apply
targets[].record_count_totalinteger|nullTotal records processed by the lane
targets[].record_count_addedinteger|nullRecords added
targets[].record_count_changedinteger|nullRecords changed
targets[].record_count_deletedinteger|nullRecords deleted
targets[].record_count_erroredinteger|nullRecords rejected by the lane

Hostcom State Machine Status Values ​

StatusDescription
pending_uploadFile has not yet been uploaded to the lane
pending_batch_resolveFile uploaded; waiting for the lane to assign a batch ID
pending_applyBatch resolved; waiting to trigger apply
applyingApply triggered; lane is processing the file
pollingApply in progress; polling the lane for completion
completedLane confirmed all records processed
erroredLane reported an error during upload, batch resolution, or apply

Errors ​

See Errors for shared error envelope format.


List Target Error Records ​

Retrieve the individual record-level errors reported by the RORC lane for a target that reached errored status.

GET /v1/hostcom/dispatches/{dispatch}/targets/{target}/error-records

Authentication: OAuth Token (service_account or user)

Permission: rorcex:hostcom-batches.view

Path Parameters ​

ParameterTypeDescription
dispatchstringHostcom dispatch identifier
targetstringStore organization hashkey

Precondition ​

The target must be in errored status. If the target is in any other status, the endpoint returns 409 Conflict.

Request Query Parameters ​

FieldTypeRequiredDescription
pageintegerNoPage offset (zero-based, default: 0)
per_pageintegerNoResults per page (default: 50)

Response ​

The response uses RORC's PascalCase paged envelope, passed through as-is from the lane.

json
{
  "Items": [
    {
      "RecordIndex": 14,
      "RecordType": "ProdRetail",
      "ErrorCode": "INVALID_PRICE",
      "ErrorDescription": "Retail price must be greater than zero"
    },
    {
      "RecordIndex": 27,
      "RecordType": "ProdRetail",
      "ErrorCode": "ITEM_NOT_FOUND",
      "ErrorDescription": "No item found for ItemCode 001234567890"
    }
  ],
  "TotalCount": 2,
  "Offset": 0,
  "Limit": 50
}

Status: 200 OK

FieldTypeDescription
ItemsarrayError records reported by the lane
Items[].RecordIndexintegerZero-based index of the record in the hostcom file
Items[].RecordTypestringRecord type of the errored row (e.g., ProdRetail)
Items[].ErrorCodestringMachine-readable error code from the lane
Items[].ErrorDescriptionstringHuman-readable description of the error
TotalCountintegerTotal number of error records for this target
OffsetintegerCurrent page offset
LimitintegerPage size used for this response

Errors ​

409 — Target not in errored status:

json
{
  "error": "hostcom_target_not_errored",
  "message": "Error records are only available for targets in errored status. Current status: completed"
}

See Errors for shared error envelope format.


Changelog
DateChange
2026-06-11Initial publication.

ShopHero CommerceCore Platform