GSC POD API

Stop

Stop Sync v21

Saves stop and product updates for one or more stops on a route. Handles stop status, product counts, OSD entries, driver comments, and signatures.

Endpoint: PUT /api/route/stop

Authentication: Required — headers: employee_id, api_token

Note (Autoclose): If stop id: 999 is submitted with arrived: true, a 10-minute server-side timer starts. When it fires, stop 999 is marked complete (PDSTATUS = 'C'), signaling the route is done.

Note (OSD): OSD entries live on each product, not on the stop. product.updates.osd_data (or product.osd_data) uses the format [{ osd_code, data: [{ comment, quantity, images_id, barcodes }] }]. barcodes is a single barcode string per entry (empty string if none). One GPODOSD row is written per data entry: PDIDCODE = product_id, PDUPCCD = barcodes. On GET, rows are matched back to the product via PDIDCODE. product.action.updates.osd_data handles itemized scan short counts (PDOSDITMZ=Y).

Note (Overage Items): Items found at the stop that are not on the manifest go in stop.updates.overage_items: [{ barcode, osd_code, quantity, comment, images_id }]. Each entry writes one GPODOSD row (PDIDCODE = '', PDUPCCD = barcode, PDOSDITMZ=N). On GET, rows with an empty PDIDCODE are returned in stop.updates.overage_items.


Request body:

{
  "id": "17140",
  "facility": "011",
  "week_end": "20251031",
  "stops": [
    {
      "id": 258,
      "arrived": false,
      "updates": {
        "status": "D",
        "followup_reason_code": "",
        "start_delivery_time": "2025-10-31T10:00:00Z",
        "end_delivery_time": "2025-10-31T10:15:00Z",
        "delivery_latitude": "41.8781",
        "delivery_longitude": "-87.6298",
        "delivered_by_driver_id": "T0048",
        "store_emp_id": "EMP001",
        "store_emp_name": "JOHN DOE",
        "driver_comments": "Left at dock",
        "skip_refuse_reason_code": "",
        "skip_refuse_timestamp": "",
        "skip_refuse_driver_comment": "",
        "signature_id": "",
        "osd_emails": [],
        "overage_items": [
          { "barcode": "012345678901", "osd_code": "85", "quantity": 1, "comment": "", "images_id": "" }
        ]
      },
      "products": [
        {
          "id": "038976",
          "invoice": "0806591",
          "updates": {
            "accounting_complete": false,
            "delivered": 6,
            "returned": 0,
            "delivered_pallets": null,
            "image_ids": null,
            "osd_data": [
              {
                "osd_code": 51,
                "data": [
                  { "comment": "1 bag missing",  "quantity": 1, "images_id": "", "barcodes": "00016000148710" },
                  { "comment": "1 damaged box",  "quantity": 1, "images_id": "", "barcodes": "016000502789"  }
                ]
              }
            ]
          },
          "action": {
            "updates": { "delivered": 0, "osd_data": [] },
            "type": null,
            "open": false,
            "open_action": null,
            "item_name": null,
            "quantity": 7
          }
        },
        {
          "id": "9001",
          "invoice": "0806591",
          "updates": {
            "accounting_complete": false,
            "delivered": 10,
            "returned": 0,
            "delivered_pallets": null,
            "image_ids": null,
            "osd_data": []
          },
          "action": {
            "updates": { "delivered": 10, "osd_data": [] },
            "type": "count",
            "open": false,
            "open_action": null,
            "item_name": null,
            "quantity": 10
          }
        }
      ],
      "collections": [
        {
          "id": "9009",
          "invoice": "0806591",
          "updates": {
            "returned": 0,
            "accounting_complete": false,
            "image_ids": null,
            "osd_data": []
          },
          "action": {
            "updates": { "delivered": 0, "osd_data": [] },
            "type": "collect",
            "open": false,
            "open_action": null,
            "item_name": null,
            "quantity": 0
          }
        }
      ]
    }
  ]
}
		

Try It Out


Result:

...

Stop Skip-Refuse

Marks a stop as skipped or refused.

Endpoint: PUT /api/route/stop/skip-refuse

Authentication: Required — headers: employee_id, api_token

Required body fields: route_id, stop_id


Try It Out


Result:

...