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

# set order synchronized



## OpenAPI

````yaml https://integration.teceo.co/aos post /v1/orders/{orderId}/sync
openapi: 3.0.0
info:
  title: teceo brand integrator API
  description: integrate your brand with teceo
  version: '1.0'
  contact: {}
servers:
  - url: /
security: []
tags: []
paths:
  /v1/orders/{orderId}/sync:
    post:
      tags:
        - 'Orders:'
      summary: set order synchronized
      operationId: OrderController_sync_v1
      parameters:
        - name: orderId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderSyncDTO'
      responses:
        '200':
          description: set order synchronized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDTO'
        '400':
          description: >-
            response status code indicates that the server cannot or will not
            process the request due to something that is perceived to be a
            client error
        '403':
          description: >-
            client error status response code indicates that the server
            understood the request but refuses to authorize it
        '404':
          description: >-
            client error response code indicates that the server can't find the
            requested resource
      security:
        - ApiKey: []
components:
  schemas:
    OrderSyncDTO:
      type: object
      properties:
        integrationCode:
          type: string
          description: required when status is "SUCCESS"
        status:
          type: string
          enum:
            - SUCCESS
            - ERROR
        message:
          type: string
          description: required when status is "ERROR"
      required:
        - status
    OrderDTO:
      type: object
      properties:
        id:
          type: string
          description: order id
        code:
          type: string
          description: order sequential code
        externalCode:
          type: string
          nullable: true
          description: external code
        deliveryWindowsType:
          type: string
          enum:
            - BY_PRODUCT
            - BY_ORDER
          description: indicates if order has delivery windows by order or product
        customerId:
          type: string
          nullable: true
          description: customer id
        customerCode:
          type: string
          nullable: true
          description: customer code
        salesRepresentativeCode:
          type: string
          nullable: true
          description: sales representative code
        sellerEmail:
          type: string
          nullable: true
          description: seller email
        status:
          type: string
          enum:
            - DRAFT
            - IN_REVISION
            - ON_APPROVAL
            - APPROVED
            - SENT
            - CANCELED
            - ABANDONED
            - REJECTED
            - SUGGESTED
          description: order status
        type:
          type: string
          enum:
            - PRE_ORDER
            - READY_FOR_DELIVERY
            - BOTH
          description: order type
        subTotal:
          type: number
          description: order subtotal
        totalDiscount:
          type: number
          description: order discount
        totalCharges:
          type: number
          description: order total charges
        totalShippingCostValue:
          type: number
          description: order total shipping cost
        totalValue:
          type: number
          description: order total value
        totalPieces:
          type: number
          description: 'order total pieces: sum of all pieces'
        totalItems:
          type: number
          description: >-
            order total items: its calculated by group of [product - color -
            availability - delivery window]
        synchronizedStatus:
          type: string
          enum:
            - SUCCESS
            - SUCCESS_RESET
            - ERROR
            - NOT_SYNCHRONIZED
            - PROCESSING
            - PROCESSING_AFTER_RESET
            - SUCCESS_WITH_PAYMENT_ERROR
          description: order synchronization status
        createdAt:
          type: string
          description: order creation date
        updatedAt:
          type: string
          description: order last update date
        maxChangedDate:
          type: string
          description: order or relations max changed date
        observation:
          type: string
          nullable: true
          description: order description
        archived:
          type: boolean
          description: order archived
        priceComposition:
          description: price composition
          type: array
          items:
            $ref: '#/components/schemas/PriceCompositionItemDTO'
        consultantCode:
          type: string
          nullable: true
          description: consultant code
        consultantName:
          type: string
          nullable: true
          description: consultant name
        priceTableCode:
          type: string
          nullable: true
          description: price table code
        items:
          description: order items
          type: array
          items:
            $ref: '#/components/schemas/OrderItemDTO'
        conditions:
          description: order conditions
          type: array
          items:
            $ref: '#/components/schemas/OrderConditionDTO'
        splitSettings:
          description: order split settings
          type: array
          items:
            $ref: '#/components/schemas/SplitSettingsDTO'
        gatewayPayments:
          description: gateway payments
          type: array
          items:
            $ref: '#/components/schemas/GatewayPaymentsDTO'
      required:
        - id
        - code
        - externalCode
        - deliveryWindowsType
        - customerId
        - customerCode
        - salesRepresentativeCode
        - status
        - type
        - subTotal
        - totalDiscount
        - totalCharges
        - totalShippingCostValue
        - totalValue
        - totalPieces
        - totalItems
        - synchronizedStatus
        - createdAt
        - updatedAt
        - maxChangedDate
        - observation
        - archived
        - priceTableCode
        - items
        - conditions
        - splitSettings
        - gatewayPayments
    PriceCompositionItemDTO:
      type: object
      properties:
        id:
          type: string
          description: price composition id
        label:
          type: string
          description: price composition label
        price:
          type: number
          description: price composition value
      required:
        - id
        - label
        - price
    OrderItemDTO:
      type: object
      properties:
        orderConditionId:
          type: string
          description: order condition id
        deliveryWindow:
          nullable: true
          description: item delivery window
          type: object
          allOf:
            - $ref: '#/components/schemas/DeliveryWindowDTO'
        sku:
          description: item sku references
          allOf:
            - $ref: '#/components/schemas/OrderItemSkuDTO'
        quantity:
          type: number
          description: item quantity
        unitPrice:
          type: number
          description: item price with discount
        unitRetailPrice:
          type: number
          description: item retail price
        grossValue:
          type: number
          description: item price without discount
        availability:
          type: string
          enum:
            - EMPTY
            - FUTURE_STOCK
            - PRE_ORDER
            - READY_FOR_DELIVERY
          description: item availability
        priceComposition:
          description: price composition
          nullable: true
          type: array
          items:
            $ref: '#/components/schemas/PriceCompositionItemDTO'
      required:
        - orderConditionId
        - deliveryWindow
        - sku
        - quantity
        - unitPrice
        - unitRetailPrice
        - grossValue
        - availability
    OrderConditionDTO:
      type: object
      properties:
        id:
          type: string
          description: condition id
        deliveryAddress:
          nullable: true
          description: delivery address
          type: object
          allOf:
            - $ref: '#/components/schemas/AddressDTO'
        payment:
          nullable: true
          description: payment method
          type: object
          allOf:
            - $ref: '#/components/schemas/PaymentMethodDTO'
        deliveryWindow:
          nullable: true
          description: delivery window
          type: object
          allOf:
            - $ref: '#/components/schemas/DeliveryWindowDTO'
        observation:
          type: string
          nullable: true
          description: condition observation
        internalObservation:
          type: string
          nullable: true
          description: condition internal observation
        shippingCostValue:
          type: number
          description: condition shipping cost value
        paymentMethodAccumulatedInterestPercentage:
          type: number
          description: condition payment method accumulated interest percentage
        collection:
          nullable: true
          description: condition collection
          type: object
          allOf:
            - $ref: '#/components/schemas/CollectionDTO'
        commercialDiscount:
          type: number
          description: condition commercial discount
        classification:
          nullable: true
          description: classification
          type: object
          allOf:
            - $ref: '#/components/schemas/BrandIntegratorClassificationDto'
        saleType:
          nullable: true
          description: sale type
          type: object
          allOf:
            - $ref: '#/components/schemas/SaleTypeDTO'
        commercialPolicies:
          description: commercial policies
          type: array
          items:
            $ref: '#/components/schemas/CommercialPolicyDTO'
        customFields:
          description: custom fields
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldDTO'
        billingForecastDate:
          type: string
          format: date-time
          nullable: true
          description: billing forecast date
      required:
        - id
        - deliveryAddress
        - payment
        - deliveryWindow
        - observation
        - internalObservation
        - shippingCostValue
        - paymentMethodAccumulatedInterestPercentage
        - collection
        - commercialDiscount
        - classification
        - saleType
        - commercialPolicies
        - customFields
        - billingForecastDate
    SplitSettingsDTO:
      type: object
      properties:
        type:
          type: string
          description: split type applied by the brand
          enum:
            - AVAILABILITY
            - DELIVERY_WINDOW
            - CLASSIFICATION_TYPE
        priority:
          type: number
          description: split priority
        classificationTypes:
          description: >-
            split classification types. only available when type is
            CLASSIFICATION_TYPE
          type: array
          items:
            $ref: '#/components/schemas/SplitSettingsClassificationTypesDTO'
      required:
        - type
        - priority
    GatewayPaymentsDTO:
      type: object
      properties:
        value:
          type: number
          description: payment value
        status:
          description: payment status
          allOf:
            - $ref: '#/components/schemas/OrderGatewayPaymentStatus'
        paymentUrl:
          type: string
          description: payment URL
        paymentExternalCode:
          type: string
          nullable: true
          description: payment external code
        createdAt:
          format: date-time
          type: string
          description: payment creation date
        user:
          description: user who created the payment
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GatewayPaymentsUserDTO'
        history:
          description: payment history
          type: array
          items:
            $ref: '#/components/schemas/GatewayPaymentsHistoryDTO'
      required:
        - value
        - status
        - paymentUrl
        - paymentExternalCode
        - createdAt
        - history
    DeliveryWindowDTO:
      type: object
      properties:
        id:
          type: string
          description: delivery window id
        code:
          type: string
          description: delivery window code
        name:
          type: string
          description: delivery window name
        startDate:
          format: date-time
          type: string
          description: delivery window start date
        endDate:
          format: date-time
          type: string
          description: delivery window end date
        preOrderLimit:
          type: string
          description: delivery window pre order limit date
          format: date-time
          nullable: true
      required:
        - id
        - code
        - name
        - startDate
        - endDate
        - preOrderLimit
    OrderItemSkuDTO:
      type: object
      properties:
        id:
          type: string
          description: order item id
        skuCode:
          type: string
          description: order item sku code
        barcode:
          type: string
          nullable: true
          description: order item barcode
        colorCode:
          type: string
          description: order item color code
        productColorId:
          type: string
          nullable: true
          description: order item product color id
        productCode:
          type: string
          description: order item product code
        sizeName:
          type: string
          description: order item size name
      required:
        - id
        - skuCode
        - barcode
        - colorCode
        - productColorId
        - productCode
        - sizeName
    AddressDTO:
      type: object
      properties:
        zipCode:
          type: string
          description: address zip code
        streetDescription:
          type: string
          description: address street name
        streetNumber:
          type: string
          description: address street number
        complement:
          type: string
          description: address complement
        reference:
          type: string
          description: address reference
        neighborhood:
          type: string
          description: address neighborhood
        city:
          type: string
          description: address city
        customerAddressId:
          type: string
          description: customer address id
        state:
          type: string
          description: address state
        country:
          type: string
          description: address country
        code:
          type: string
          description: address code
        type:
          type: string
          description: address type
          enum:
            - DELIVERY
            - BILLING
            - COMMERCIAL
      required:
        - zipCode
        - streetDescription
        - streetNumber
        - complement
        - reference
        - neighborhood
        - city
        - customerAddressId
        - state
        - country
        - code
        - type
    PaymentMethodDTO:
      type: object
      properties:
        id:
          type: string
          description: payment method id
        name:
          type: string
          description: payment method name
        code:
          type: string
          description: payment method code
        orderDiscountCode:
          type: number
          description: payment method discount code
        orderDiscount:
          type: number
          description: payment method discount
        accumulatedInterestPercentage:
          type: number
          description: payment method accumulated interest percentage
        availability:
          description: payment method availability
          type: array
          items:
            type: string
        supplementaryPayment:
          type: string
          description: payment method supplementary payment type
          enum:
            - BANK_SLIP
            - CREDIT_CARD
            - DEBIT_CARD
            - POS_RECEIPT
            - GIFT_CHECK
            - PAYPAL
            - INVOICE
            - ADVANCE
            - VOUCHER
            - PIX
            - PICPAY
          nullable: true
      required:
        - id
        - name
        - code
        - orderDiscountCode
        - orderDiscount
        - accumulatedInterestPercentage
        - availability
    CollectionDTO:
      type: object
      properties:
        id:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        code:
          type: string
          description: collection code
        name:
          type: string
          description: collection name
        origin:
          type: string
          enum:
            - INTEGRATION
            - TECEO
          description: collection origin
      required:
        - id
        - createdAt
        - updatedAt
        - code
        - name
        - origin
    BrandIntegratorClassificationDto:
      type: object
      properties:
        code:
          type: string
        name:
          type: string
        description:
          type: string
      required:
        - code
        - name
        - description
    SaleTypeDTO:
      type: object
      properties:
        code:
          type: string
          description: sale type code
        name:
          type: string
          description: sale type name
      required:
        - code
        - name
    CommercialPolicyDTO:
      type: object
      properties:
        code:
          type: string
          nullable: true
          description: commercial policy code
        name:
          type: string
          description: commercial policy name
      required:
        - code
        - name
    CustomFieldDTO:
      type: object
      properties:
        name:
          type: string
          description: custom field name
        type:
          type: string
          description: custom field type
          enum:
            - DATE
            - UNSIGNED_INTEGER
            - BOOLEAN
            - GENERIC_VALUES
        value:
          description: custom field value
          oneOf:
            - type: string
            - type: number
          nullable: true
      required:
        - name
        - type
        - value
    SplitSettingsClassificationTypesDTO:
      type: object
      properties:
        id:
          type: string
          description: classification type id
        name:
          type: string
          description: classification type name
        code:
          type: string
          description: classification type code
      required:
        - id
        - name
        - code
    OrderGatewayPaymentStatus:
      type: string
      enum:
        - PENDING
        - PAID
        - EXPIRED
        - CANCELED
        - ERROR
        - WAITING_REFUND
        - REFUNDED
        - PAYMENT_FAILED
      description: payment status
    GatewayPaymentsUserDTO:
      type: object
      properties:
        name:
          type: string
          description: user name
        surname:
          type: string
          description: user surname
        email:
          type: string
          description: user email
      required:
        - name
        - surname
        - email
    GatewayPaymentsHistoryDTO:
      type: object
      properties:
        createdAt:
          format: date-time
          type: string
          description: payment history creation date
        status:
          description: payment status
          allOf:
            - $ref: '#/components/schemas/OrderGatewayPaymentStatus'
      required:
        - createdAt
        - status
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: unique identifier access key. each brand has it own unique key.

````