# [Not Implemented] Receive order status update

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.cata.sg/pos-integration-service-api/api/v-1/orders/order-id/llms.txt.
> For full documentation content, see https://apidocs.cata.sg/pos-integration-service-api/api/v-1/orders/order-id/llms-full.txt.

PATCH http://localhost:8080/api/v1/orders/{orderId}
Content-Type: application/json

> **Status: Not Implemented**

Receives an order status update from the third-party POS system. Cata does not push status changes to the POS — status changes originate from the POS and are forwarded to Cata.


Reference: https://apidocs.cata.sg/pos-integration-service-api/api/v-1/orders/order-id/not-implemented-receive-order-status-update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/orders/{orderId}:
    patch:
      operationId: not-implemented-receive-order-status-update
      summary: '[Not Implemented] Receive order status update'
      description: >
        > **Status: Not Implemented**


        Receives an order status update from the third-party POS system. Cata
        does not push status changes to the POS — status changes originate from
        the POS and are forwarded to Cata.
      tags:
        - >-
          subpackage_api.subpackage_api/v1.subpackage_api/v1/orders.subpackage_api/v1/orders/orderId
      parameters:
        - name: orderId
          in: path
          description: Order identifier
          required: true
          schema:
            type: string
        - name: X-Api-Key
          in: header
          required: true
          schema:
            type: string
        - name: X-Tenant-ID
          in: header
          description: Tenant identifier
          required: false
          schema:
            type: string
        - name: X-Store-ID
          in: header
          description: Store identifier
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api_v1_orders_{orderId}_[Not Implemented]
                  Receive order status update_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PatchApiV1OrdersOrderidRequestBadRequestError
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PatchApiV1OrdersOrderidRequestNotFoundError
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                posType:
                  type: string
                status:
                  type: string
                reason:
                  type: string
              required:
                - posType
                - status
                - reason
servers:
  - url: http://localhost:8080
components:
  schemas:
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsUnitPrice:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsUnitPrice
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsTotalPrice:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsTotalPrice
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsPrice:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsPrice
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsMetadata:
      type: object
      properties:
        key_0:
          type: integer
        key_1:
          type: string
      required:
        - key_0
        - key_1
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsMetadata
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        price:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsPrice
        quantity:
          type: integer
        externalId:
          type: string
        metadata:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItemsMetadata
      required:
        - id
        - name
        - price
        - quantity
        - externalId
        - metadata
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItems
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsMetadata:
      type: object
      properties:
        key_0:
          type: integer
        key_1:
          type: string
      required:
        - key_0
        - key_1
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsMetadata
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        quantity:
          type: integer
        unitPrice:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsUnitPrice
        externalId:
          type: string
        description:
          type: string
        totalPrice:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsTotalPrice
        modifiers:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsModifiersItems
        specialInstructions:
          type: string
        metadata:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItemsMetadata
      required:
        - id
        - name
        - quantity
        - unitPrice
        - externalId
        - description
        - totalPrice
        - modifiers
        - specialInstructions
        - metadata
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItems
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTotalAmount:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTotalAmount
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomerAddress:
      type: object
      properties:
        street:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - street
        - city
        - state
        - postalCode
        - country
        - latitude
        - longitude
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomerAddress
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomer:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        phone:
          type: string
        address:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomerAddress
      required:
        - id
        - name
        - email
        - phone
        - address
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomer
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderSubtotal:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderSubtotal
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTax:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTax
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTip:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTip
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryFee:
      type: object
      properties:
        amount:
          type: integer
        currency:
          type: string
      required:
        - amount
        - currency
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryFee
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryAddress:
      type: object
      properties:
        street:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        country:
          type: string
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - street
        - city
        - state
        - postalCode
        - country
        - latitude
        - longitude
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryAddress
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderMetadata:
      type: object
      properties:
        key_0:
          type: number
          format: double
        key_1:
          type: integer
      required:
        - key_0
        - key_1
      title: >-
        ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderMetadata
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrder:
      type: object
      properties:
        id:
          type: string
        storeId:
          type: string
        items:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderItemsItems
        totalAmount:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTotalAmount
        status:
          type: string
        externalId:
          type: string
        channelOrderId:
          type: string
        channelName:
          type: string
        customer:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderCustomer
        subtotal:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderSubtotal
        tax:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTax
        tip:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderTip
        deliveryFee:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryFee
        orderType:
          type: string
        scheduledFor:
          type: string
          format: date-time
        estimatedDeliveryTime:
          type: string
          format: date-time
        pickupTime:
          type: string
          format: date-time
        deliveryAddress:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderDeliveryAddress
        notes:
          type: string
        metadata:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrderMetadata
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - storeId
        - items
        - totalAmount
        - status
        - externalId
        - channelOrderId
        - channelName
        - customer
        - subtotal
        - tax
        - tip
        - deliveryFee
        - orderType
        - scheduledFor
        - estimatedDeliveryTime
        - pickupTime
        - deliveryAddress
        - notes
        - metadata
        - createdAt
        - updatedAt
      title: ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrder
    api_v1_orders_{orderId}_[Not Implemented] Receive order status update_Response_200:
      type: object
      properties:
        success:
          type: boolean
        orderId:
          type: string
        externalOrderId:
          type: string
        status:
          type: string
        order:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaOrder
        message:
          type: string
      required:
        - success
        - orderId
        - externalOrderId
        - status
        - order
        - message
      title: >-
        api_v1_orders_{orderId}_[Not Implemented] Receive order status
        update_Response_200
    ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        details:
          type: string
        field:
          type: string
      required:
        - code
        - message
        - details
        - field
      title: ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaError
    PatchApiV1OrdersOrderidRequestBadRequestError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: PatchApiV1OrdersOrderidRequestBadRequestError
    PatchApiV1OrdersOrderidRequestNotFoundError:
      type: object
      properties:
        error:
          $ref: >-
            #/components/schemas/ApiV1OrdersOrderIdPatchResponsesContentApplicationJsonSchemaError
      required:
        - error
      title: PatchApiV1OrdersOrderidRequestNotFoundError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

```

## SDK Code Examples

```python api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
import requests

url = "http://localhost:8080/api/v1/orders/string"

payload = {
    "posType": "LIGHTSPEED",
    "status": "PENDING",
    "reason": "string"
}
headers = {
    "X-Tenant-ID": "string",
    "X-Store-ID": "string",
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
const url = 'http://localhost:8080/api/v1/orders/string';
const options = {
  method: 'PATCH',
  headers: {
    'X-Tenant-ID': 'string',
    'X-Store-ID': 'string',
    'X-Api-Key': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"posType":"LIGHTSPEED","status":"PENDING","reason":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/orders/string"

	payload := strings.NewReader("{\n  \"posType\": \"LIGHTSPEED\",\n  \"status\": \"PENDING\",\n  \"reason\": \"string\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("X-Tenant-ID", "string")
	req.Header.Add("X-Store-ID", "string")
	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/orders/string")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["X-Tenant-ID"] = 'string'
request["X-Store-ID"] = 'string'
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"posType\": \"LIGHTSPEED\",\n  \"status\": \"PENDING\",\n  \"reason\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("http://localhost:8080/api/v1/orders/string")
  .header("X-Tenant-ID", "string")
  .header("X-Store-ID", "string")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"posType\": \"LIGHTSPEED\",\n  \"status\": \"PENDING\",\n  \"reason\": \"string\"\n}")
  .asString();
```

```php api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'http://localhost:8080/api/v1/orders/string', [
  'body' => '{
  "posType": "LIGHTSPEED",
  "status": "PENDING",
  "reason": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
    'X-Store-ID' => 'string',
    'X-Tenant-ID' => 'string',
  ],
]);

echo $response->getBody();
```

```csharp api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/orders/string");
var request = new RestRequest(Method.PATCH);
request.AddHeader("X-Tenant-ID", "string");
request.AddHeader("X-Store-ID", "string");
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"posType\": \"LIGHTSPEED\",\n  \"status\": \"PENDING\",\n  \"reason\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift api_v1_orders_{orderId}_[Not Implemented] Receive order status update_example
import Foundation

let headers = [
  "X-Tenant-ID": "string",
  "X-Store-ID": "string",
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "posType": "LIGHTSPEED",
  "status": "PENDING",
  "reason": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/orders/string")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```