# Update SalesOrder Tracking Number

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/salesorder/{salesOrderNo}/shipping-detail:
    put:
      summary: Update SalesOrder Tracking Number
      deprecated: false
      description: อัพเดทข้อมูล tracking number ของ salesorder
      tags:
        - Venio/SalesOrder
      parameters:
        - name: salesOrderNo
          in: path
          description: ''
          required: true
          schema:
            type: string
        - name: Ocp-Apim-Subscription-Key
          in: header
          description: รหัส subscription key ลูกค้า
          required: true
          example: <Your Subscription-Key>
          schema:
            type: string
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                trackingNumber:
                  type: string
                  description: หมายเลขติดตามพัสดุ
              x-apidog-orders:
                - 01JSXZFH2J8QS8PEPWBQGWNZ47
              required:
                - trackingNumber
              x-apidog-refs:
                01JSXZFH2J8QS8PEPWBQGWNZ47:
                  $ref: '#/components/schemas/SalesOrder.ShippingDetailModel'
              x-apidog-ignore-properties:
                - trackingNumber
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                      description:
                        type: string
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                  data:
                    type: object
                    properties:
                      salesOrderSubject:
                        type: string
                      customerCode:
                        type: string
                      customerId:
                        type: integer
                      salesOrderNo:
                        type: string
                      salesOrderStatus:
                        type: integer
                      salesOrderDate:
                        type: string
                      recipientName:
                        type: string
                      recipientAddress:
                        type: string
                      headerTemplateId:
                        type: integer
                      warehouseCode:
                        type: string
                        description: รหัสคลังสินค้า
                        nullable: true
                      salesorderDetails:
                        type: array
                        items:
                          type: object
                          properties:
                            productCode:
                              type: string
                            productName:
                              type: string
                            price:
                              type: integer
                            qty:
                              type: integer
                            productUnitName:
                              type: string
                            productDescription:
                              type: string
                            discountValue:
                              type: integer
                            discountType:
                              type: boolean
                            vatTaxValue:
                              type: number
                            whtTaxValue:
                              type: number
                            totalPrice:
                              type: integer
                            unitId:
                              type: integer
                            isShipping:
                              type: boolean
                            warehouseCode:
                              type: string
                              description: รหัสคลังสินค้า
                              nullable: true
                          x-apidog-orders:
                            - productCode
                            - productName
                            - price
                            - qty
                            - productUnitName
                            - productDescription
                            - discountValue
                            - discountType
                            - vatTaxValue
                            - whtTaxValue
                            - totalPrice
                            - unitId
                            - isShipping
                            - warehouseCode
                          x-apidog-ignore-properties: []
                      discountName:
                        type: string
                      discountValue:
                        type: integer
                      discountType:
                        type: boolean
                      paymentTerm:
                        type: string
                      remark:
                        type: string
                      staffCode:
                        type: string
                      salesOrderNote:
                        type: string
                      vatCalculation:
                        type: boolean
                      subTotal:
                        type: integer
                      subTotalWithDiscount:
                        type: integer
                      grandTotal:
                        type: integer
                      payment:
                        type: object
                        properties:
                          valueType:
                            type: integer
                          schedulePayments:
                            type: array
                            items:
                              type: object
                              properties:
                                installmentNumber:
                                  type: integer
                                status:
                                  type: integer
                                installmentAmount:
                                  type: number
                                installmentPercent:
                                  type: number
                              required:
                                - installmentNumber
                                - status
                                - installmentAmount
                                - installmentPercent
                              x-apidog-orders:
                                - installmentNumber
                                - status
                                - installmentAmount
                                - installmentPercent
                              x-apidog-ignore-properties: []
                        required:
                          - valueType
                          - schedulePayments
                        x-apidog-orders:
                          - valueType
                          - schedulePayments
                        x-apidog-ignore-properties: []
                      privateNote:
                        type: string
                      invoiceInfo:
                        type: object
                        properties:
                          id:
                            type: integer
                          integrationPlatform:
                            type: integer
                            description: Shopee - 400020, NocNoc - 400027
                          integrationBuyerId:
                            type: string
                            description: Identify for buyer depends on marketplace platform
                          type:
                            type: integer
                            description: Business - 13002, Individual - 13001
                          customerName:
                            type: string
                          taxId:
                            type: string
                          isEtax:
                            type: boolean
                          isHeadOffice:
                            type: boolean
                          branch:
                            type: string
                          branchCode:
                            type: string
                          country:
                            type: string
                          province:
                            type: string
                          district:
                            type: string
                          subDistrict:
                            type: string
                          zipCode:
                            type: string
                          phone:
                            type: string
                          address:
                            type: string
                          email:
                            type: string
                        x-apidog-orders:
                          - id
                          - integrationPlatform
                          - integrationBuyerId
                          - type
                          - customerName
                          - taxId
                          - isEtax
                          - isHeadOffice
                          - branch
                          - branchCode
                          - country
                          - province
                          - district
                          - subDistrict
                          - zipCode
                          - phone
                          - address
                          - email
                        required:
                          - id
                          - integrationPlatform
                          - integrationBuyerId
                          - type
                          - customerName
                          - taxId
                          - isEtax
                          - isHeadOffice
                          - branch
                          - branchCode
                          - country
                          - province
                          - district
                          - subDistrict
                          - zipCode
                          - phone
                          - address
                          - email
                        x-apidog-ignore-properties: []
                      shippingDocumentUrl:
                        type: string
                      trackingNo:
                        type: string
                        description: For sale order from marketplace integration
                      discounts:
                        type: array
                        items:
                          $ref: >-
                            #/components/schemas/SalesOrder.SalesOrderDiscountDto
                        description: >-
                          Array ของส่วนลดสำหรับ order ที่มีส่วนลดหลายแบบ (จาก
                          3rd party)
                      referenceNo:
                        type: string
                        description: เลขที่อ้างอิง
                        nullable: true
                      contactId:
                        type: integer
                        description: รหัสผู้ติดต่อ
                        nullable: true
                      customerAddressId:
                        type: integer
                        description: ID ที่อยู่ลูกค้า
                        nullable: true
                      currencyCode:
                        type: string
                        description: สกุลเงิน เช่น THB, USD
                        nullable: true
                      salesOrderId:
                        type: integer
                        description: Id ใบสั่งขาย
                      totalVat:
                        type: number
                        description: ยอด VAT รวม
                      integrationPlatform:
                        type: integer
                        description: 'Platform: Shopee=400020, NocNoc=400027'
                        nullable: true
                      recipient:
                        type: object
                        properties:
                          name:
                            type: string
                          email:
                            type: string
                          phone:
                            type: string
                          country:
                            type: string
                          province:
                            type: string
                          district:
                            type: string
                          subDistrict:
                            type: string
                          zipCode:
                            type: string
                          '':
                            type: string
                        x-apidog-orders:
                          - name
                          - email
                          - phone
                          - country
                          - province
                          - district
                          - subDistrict
                          - zipCode
                          - ''
                        description: ข้อมูลผู้รับสินค้า (structured)
                        x-apidog-ignore-properties: []
                        nullable: true
                      isIntegrationOrderPaid:
                        type: boolean
                        description: สถานะชำระจาก integration
                        nullable: true
                      salesOrderCustomerAddress:
                        type: object
                        properties:
                          addressId:
                            type: integer
                          locationName:
                            type: string
                          location:
                            type: string
                          locationEN:
                            type: string
                          fullAddress:
                            type: string
                          fullAddressEN:
                            type: string
                          subdistrict:
                            type: string
                          subdistrictEN:
                            type: string
                          district:
                            type: string
                          districtEN:
                            type: string
                          province:
                            type: string
                          provinceEN:
                            type: string
                          zipCode:
                            type: string
                          phone:
                            type: string
                        x-apidog-orders:
                          - addressId
                          - locationName
                          - location
                          - locationEN
                          - fullAddress
                          - fullAddressEN
                          - subdistrict
                          - subdistrictEN
                          - district
                          - districtEN
                          - province
                          - provinceEN
                          - zipCode
                          - phone
                        description: ที่อยู่ลูกค้า
                        x-apidog-ignore-properties: []
                        nullable: true
                    required:
                      - salesOrderSubject
                      - customerCode
                      - customerId
                      - salesOrderNo
                      - salesOrderStatus
                      - salesOrderDate
                      - recipientName
                      - recipientAddress
                      - headerTemplateId
                      - salesorderDetails
                      - discountName
                      - discountValue
                      - discountType
                      - paymentTerm
                      - remark
                      - staffCode
                      - salesOrderNote
                      - vatCalculation
                      - subTotal
                      - subTotalWithDiscount
                      - grandTotal
                      - payment
                    x-apidog-orders:
                      - salesOrderSubject
                      - customerCode
                      - customerId
                      - salesOrderNo
                      - salesOrderStatus
                      - salesOrderDate
                      - recipientName
                      - recipientAddress
                      - headerTemplateId
                      - warehouseCode
                      - salesorderDetails
                      - discountName
                      - discountValue
                      - discountType
                      - paymentTerm
                      - remark
                      - staffCode
                      - salesOrderNote
                      - vatCalculation
                      - subTotal
                      - subTotalWithDiscount
                      - grandTotal
                      - payment
                      - privateNote
                      - invoiceInfo
                      - shippingDocumentUrl
                      - trackingNo
                      - discounts
                      - referenceNo
                      - contactId
                      - customerAddressId
                      - currencyCode
                      - salesOrderId
                      - totalVat
                      - integrationPlatform
                      - recipient
                      - isIntegrationOrderPaid
                      - salesOrderCustomerAddress
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - data
                x-apidog-orders:
                  - status
                  - data
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Success (200)
                  value:
                    status:
                      code: '1000'
                      description: Success
                    data:
                      salesOrderSubject: ใบสั่งขาย - บริษัท ABC จำกัด
                      customerCode: CUST-001
                      customerId: 1001
                      salesOrderNo: SOZ-260400032
                      salesOrderStatus: 1
                      salesOrderDate: '2026-04-21T00:00:00'
                      recipientName: คุณสมชาย ใจดี
                      recipientAddress: 123/45 ถ.สุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพฯ 10110
                      headerTemplateId: 1
                      warehouseCode: WHGENERAL
                      salesorderDetails:
                        - productCode: PRD-001
                          productName: สินค้าตัวอย่าง A
                          price: 1000
                          qty: 2
                          productUnitName: ชิ้น
                          productDescription: รายละเอียดสินค้าตัวอย่าง A
                          discountValue: 50
                          discountType: false
                          vatTaxValue: 7
                          whtTaxValue: 3
                          totalPrice: 1950
                          unitId: 10
                          isShipping: true
                          warehouseCode: WHGENERAL
                        - productCode: PRD-002
                          productName: สินค้าตัวอย่าง B
                          price: 500
                          qty: 5
                          productUnitName: กล่อง
                          productDescription: รายละเอียดสินค้าตัวอย่าง B
                          discountValue: 10
                          discountType: true
                          vatTaxValue: 7
                          whtTaxValue: null
                          totalPrice: 2325
                          unitId: 12
                          isShipping: false
                          warehouseCode: WHGENERAL
                      discountName: ส่วนลดพิเศษ
                      discountValue: 100
                      discountType: false
                      paymentTerm: Net 30
                      remark: กรุณาจัดส่งในวันทำการถัดไป
                      staffCode: STAFF-001
                      salesOrderNote: ลูกค้า VIP — ดูแลเป็นพิเศษ
                      vatCalculation: true
                      subTotal: 4275
                      subTotalWithDiscount: 4175
                      grandTotal: 4467.25
                      payment:
                        valueType: 1
                        schedulePayments:
                          - installmentNumber: 1
                            status: 1
                            installmentAmount: 2233.63
                            installmentPercent: 50
                          - installmentNumber: 2
                            status: 0
                            installmentAmount: 2233.62
                            installmentPercent: 50
                      privateNote: โน้ตสำหรับทีมภายใน ไม่แสดงลูกค้า
                      invoiceInfo:
                        id: 5001
                        integrationPlatform: 400020
                        integrationBuyerId: shopee_buyer_98765
                        type: 13002
                        customerName: บริษัท ABC จำกัด
                        taxId: '0105560123456'
                        isEtax: true
                        isHeadOffice: true
                        branch: สำนักงานใหญ่
                        branchCode: '00000'
                        country: TH
                        province: กรุงเทพมหานคร
                        district: คลองเตย
                        subDistrict: คลองเตย
                        zipCode: '10110'
                        phone: 02-123-4567
                        address: 123/45 ถ.สุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพฯ
                        email: billing@abc.co.th
                      shippingDocumentUrl: https://storage.veniocrm.com/shipping/SOZ-260400032.pdf
                      trackingNo: TH123456789
                      discounts:
                        - discountName: ส่วนลดสมาชิก
                          discountValue: 50
                          discountType: false
                        - discountName: โปรโมชั่นพิเศษ Q2
                          discountValue: 5
                          discountType: true
                      referenceNo: REF-2026-00123
                      contactId: 301
                      customerAddressId: 7002
                      currencyCode: THB
                      salesOrderId: 20260400032
                      totalVat: 292.25
                      integrationPlatform: 400020
                      recipient:
                        name: คุณสมชาย ใจดี
                        email: somchai@example.com
                        phone: 081-234-5678
                        country: TH
                        province: กรุงเทพมหานคร
                        district: คลองเตย
                        subDistrict: คลองเตย
                        zipCode: '10110'
                        address: >-
                          123/45 ถ.สุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพฯ
                          10110
                      isIntegrationOrderPaid: true
                      salesOrderCustomerAddress:
                        addressId: 7002
                        locationName: ที่อยู่สำนักงานใหญ่
                        location: >-
                          123/45 ถ.สุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพฯ
                          10110
                        locationEN: >-
                          123/45 Sukhumvit Rd., Khlong Toei, Khlong Toei,
                          Bangkok 10110
                        fullAddress: >-
                          123/45 ถ.สุขุมวิท แขวงคลองเตย เขตคลองเตย กรุงเทพมหานคร
                          10110
                        fullAddressEN: >-
                          123/45 Sukhumvit Rd., Khlong Toei, Khlong Toei,
                          Bangkok 10110
                        subdistrict: คลองเตย
                        subdistrictEN: Khlong Toei
                        district: คลองเตย
                        districtEN: Khlong Toei
                        province: กรุงเทพมหานคร
                        provinceEN: Bangkok
                        zipCode: '10110'
                        phone: 02-123-4567
                '2':
                  summary: Not Found (404)
                  value:
                    status:
                      code: '1104'
                      description: SalesOrderNo doesn't exist
                '3':
                  summary: Unauthorized (401)
                  value:
                    statusCode: 401
                    message: >-
                      Access denied due to invalid subscription key. Make sure
                      to provide a valid key for an active subscription.
          headers: {}
          x-apidog-name: Success
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: |-
                      สถานะ code ของ httpเช่น
                      200 Ok
                      201 Created
                      400 BadRequest
                      401 Unauthorized
                      404 Record not found
                      500 Internal Server Error
                  message:
                    type: string
                    description: คำบรรยาย error
                x-apidog-orders:
                  - statusCode
                  - message
                required:
                  - statusCode
                  - message
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Unauthorized
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: "<p>สถานะของ\_Business\_Code\_ถ้า<br>Success\_=\_1000<br>Error\_1\_ตัว\_=\_4001<br>Error\_มากกว่า\_1\_ตัว\_=\_4002\_\_\_\_<br>หรือเป็น\_Subcode\_ที่ต้องการจะแสดงเพื่อสื่อความหมายของ\_Error\_โดย\_subcode\_จะเป็นตัวเดียวกับ\_business\_error\_code\_หรือไม่ก็ได้\_เพื่อความสะดวกในการแสดงผล<p>"
                      description:
                        type: string
                        description: "คำบรรยายsubcode/bussiness\_code"
                    required:
                      - code
                      - description
                    x-apidog-orders:
                      - code
                      - description
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - status
                required:
                  - status
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Not Found
        x-200:User authentication required V2.:
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Required%20authorization'
                  status:
                    $ref: '#/components/schemas/Response%20Error%20Msg%20'
                required:
                  - data
                  - status
                x-apidog-orders:
                  - data
                  - status
                x-apidog-ignore-properties: []
              example:
                data:
                  subCode: E9103
                  description: Authorization credentials required
                  metadata: {}
                status:
                  code: '4001'
                  description: Business error with 1 errors
          headers: {}
          x-apidog-name: User authentication required V2.
      security:
        - bearer: []
      x-apidog-folder: Venio/SalesOrder
      x-apidog-status: developing
      x-run-in-apidog: https://app.apidog.com/web/project/351895/apis/api-16345041-run
components:
  schemas:
    SalesOrder.ShippingDetailModel:
      type: object
      properties:
        trackingNumber:
          type: string
          description: หมายเลขติดตามพัสดุ
      x-apidog-orders:
        - trackingNumber
      required:
        - trackingNumber
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    SalesOrder.SalesOrderDiscountDto:
      type: object
      properties:
        discountName:
          type: string
          description: ชื่อส่วนลด
        discountValue:
          type: integer
          description: ส่วนลด
        discountType:
          type: boolean
          description: |-
            ส่วนลดเป็น % หรือไม่
            true = เป็น
            false = ไม่
      required:
        - discountName
        - discountValue
        - discountType
      x-apidog-orders:
        - discountName
        - discountValue
        - discountType
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    'Response Error Msg ':
      type: object
      properties:
        code:
          type: string
          x-apidog-mock: '4001'
        description:
          type: string
          x-apidog-mock: Business error with 1 errors
      required:
        - code
        - description
      x-apidog-orders:
        - code
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Required authorization:
      type: object
      properties:
        subCode:
          type: string
          x-apidog-mock: E9103
        description:
          type: string
          x-apidog-mock: Authorization credentials required
        metadata:
          type: object
          properties: {}
          x-apidog-orders: []
          x-apidog-ignore-properties: []
      required:
        - subCode
        - description
        - metadata
      x-apidog-orders:
        - subCode
        - description
        - metadata
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    bearerAuth:
      type: jwt
      scheme: bearer
      bearerFormat: JWT
      description: ใส่ JWT Token ในรูปแบบ Bearer {token}
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://api.gofive.co.th
    description: Production
security:
  - bearerAuth: []
    x-apidog:
      schemeGroups:
        - id: uyL_cJmK7q60QJZRTi5ot
          schemeIds:
            - bearerAuth
      required: true
      use:
        id: uyL_cJmK7q60QJZRTi5ot
      scopes:
        uyL_cJmK7q60QJZRTi5ot:
          bearerAuth: []

```
