> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Packing List

> This endpoint updates an existing packing_list.

### Body

<ParamField body="id" required="false" default="null">
  The id of the packing\_list to be created. If not provided, a new id will be generated.
</ParamField>

<ParamField body="number" required="false" default="null">
  The number of the packing\_list to be created. If not provided, a new number will be generated.
</ParamField>

<ParamField body="deliveryDate" required="false" default="null">
  The deliveryDate of the packing\_list to be created. If not provided, a new deliveryDate will be generated.
</ParamField>

<ParamField body="invoice_number" required="false" default="null">
  The invoice\_number of the packing\_list to be created. If not provided, a new invoice\_number will be generated.
</ParamField>

<ParamField body="arrivalDate" required="false" default="null">
  The arrivalDate of the packing\_list to be created. If not provided, a new arrivalDate will be generated.
</ParamField>

<ParamField body="purchase_order_number" required="false" default="null">
  The purchase\_order\_number of the packing\_list to be created. If not provided, a new purchase\_order\_number will be generated.
</ParamField>

<ParamField body="ship_per" required="false" default="null">
  The ship\_per of the packing\_list to be created. If not provided, a new ship\_per will be generated.
</ParamField>

<ParamField body="tracking_number" required="false" default="null">
  The tracking\_number of the packing\_list to be created. If not provided, a new tracking\_number will be generated.
</ParamField>

### Response

<ResponseField name="id" type="string">
  This is the unique identifier for the packing list.
</ResponseField>

<ResponseField name="number" type="string">
  This is the number associated with the packing list.
</ResponseField>

<ResponseField name="deliveryDate" type="string">
  This is the date of delivery for the packing list.
</ResponseField>

<ResponseField name="invoice_number" type="string">
  This is the invoice number associated with the packing list.
</ResponseField>

<ResponseField name="arrivalDate" type="string">
  This is the date of arrival for the packing list.
</ResponseField>

<ResponseField name="purchase_order_number" type="string">
  This is the purchase order number associated with the packing list.
</ResponseField>

<ResponseField name="ship_per" type="string">
  This is the shipping information or carrier for the packing list.
</ResponseField>

<ResponseField name="tracking_number" type="string">
  This is the tracking number associated with the shipment for the packing list.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/packing_list/:id' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "user_group_id": "example_1",
      "name": "Example 1",
      "mapping": {"40": "213", "134": "386"},
      "properties": {"filterValue": "value"}
  }'
  ```

  ```graphQL GraphQL theme={null}

                 mutation (
                  $id: String
                  $packing_list: packing_list_set_input!
                ) {
                  update_packing_list (
                  where: { id : { _eq: $id }}
                  _set: $packing_list
                  ) {
                    returning {
                      id
                      number
                      arrivalDate
                      deliveryDate
                      ship_per
                      shipment_type
                      invoice_number
                      purchase_order_number
                      tracking_number
                      status
                      source
                      destination
                      units
                    }
                  }
                }


  ```

  ```javascript Node.js theme={null}

  const updated = await stateset.packinglists.update(
    'pi_ODkRWQtx9NVsRX'
  );

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "1",
    "number": "1",
    "deliveryDate": "2020-01-01",
    "arrivalDate": "2020-01-01",
    "ship_per": "John Doe",
    "tracking_number": "1234567890"
  }

  ```
</ResponseExample>
