---
title: "Sync Shopify Order"
method: POST
path: "/orders/external/shopify"
tags: ["Pedido"]
---

# Sync Shopify Order

`POST /orders/external/shopify`

Crear o actualizar pedido externo de Shopify

## Headers

- `X-Company-Token` string, required

## Request body

- ShopifyOrderSyncRequest
  - `provider` string
  - `channel` string
  - `tax_in_shipping` string, nullable
  - `auto_invoice_mode` string, nullable
  - `external_order_id` string, required
  - `external_order_number` string, required
  - `legacy_resource_id` string, nullable
  - `created_at` string, nullable
  - `updated_at` string, nullable
  - `external_status` ShopifyOrderStatus
    - `financial` string, nullable
    - `fulfillment` string, nullable
  - `customer` ShopifyOrderCustomer
    - `id` string, nullable
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `display_name` string, nullable
    - `name` string, nullable
    - `email` string, nullable
    - `phone` string, nullable
  - `email` string, nullable
  - `phone` string, nullable
  - `billing_address` ShopifyOrderAddress
    - `name` string, nullable
    - `company` string, nullable
    - `document_number` string, nullable
    - `document_type` string, nullable
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `address1` string, nullable
    - `address2` string, nullable
    - `city` string, nullable
    - `province` string, nullable
    - `province_code` string, nullable
    - `country` string, nullable
    - `country_code` string, nullable
    - `zip` string, nullable
    - `phone` string, nullable
  - `shipping_address` ShopifyOrderAddress
    - `name` string, nullable
    - `company` string, nullable
    - `document_number` string, nullable
    - `document_type` string, nullable
    - `first_name` string, nullable
    - `last_name` string, nullable
    - `address1` string, nullable
    - `address2` string, nullable
    - `city` string, nullable
    - `province` string, nullable
    - `province_code` string, nullable
    - `country` string, nullable
    - `country_code` string, nullable
    - `zip` string, nullable
    - `phone` string, nullable
  - `line_items` ShopifyOrderLineItem[]
    - `id` string, required
    - `sku` string, nullable
    - `name` string, required
    - `quantity` number, required
    - `unit_price` number
    - `discounted_unit_price` number
    - `discount_total` number
    - `currency` string, nullable
  - `shipping_lines` ShopifyOrderShippingLine[]
    - `id` string, required
    - `title` string, nullable
    - `original_price` number
    - `discounted_price` number
    - `discount_total` number
    - `currency` string, nullable
  - `discounts` ShopifyOrderDiscounts
    - `total` number
  - `totals` ShopifyOrderTotals
    - `subtotal` number
    - `shipping` number
    - `tax` number
    - `total` number
    - `taxes_included` boolean
  - `currency` string, nullable
  - `factpro_billing` ShopifyFactproBilling
    - `invoice_type` string, nullable
    - `customer_document_type` string, nullable
    - `customer_document_number` string, nullable
    - `customer_full_name` string, nullable
    - `company_ruc` string, nullable
    - `company_address` string, nullable
    - `company_name` string, nullable
  - `raw_payload` object

## Response `200`

Successful Response

- ShopifyOrderSyncResponse
  - `success` boolean
  - `message` string, required
  - `data` ShopifyOrderSyncData, required
    - `order_id` integer, required
    - `number` string, required
    - `external_order_id` string, required
    - `external_order_number` string, nullable
    - `provider` string
    - `channel` string
    - `status` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/factpro/apis/note-service-api.md) · [All operations](https://skmtc.net/factpro/apis/note-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/factpro/note-service-api/revisions/d88e14b2de42/schema)
