---
title: "Completes the goods order (Beta)"
method: POST
path: "/goods-orders/{id}/complete"
tags: ["Goods Order"]
---

# Completes the goods order (Beta)

`POST /goods-orders/{id}/complete`

Completes the goods order with the ID and creates a transaction

## Response `200`

Completed order with transaction

- object
  - `transaction` object — Transaction information.
    - `id` integer — Transaction ID
  - `order` GoodsOrderDetailed — Detailed goods order from the UDS marketplace. Contains order items, delivery info, payment method, loyalty calculation, and processing status.
    - `id` integer — Order ID.
    - `dateCreated` string, date-time — Order date.
    - `comment` string, nullable — Comment on the order.
    - `state` 'NEW' | 'COMPLETED' | 'DELETED' | 'WAITING_PAYMENT' | 'NEED_ACK' — Order lifecycle status: * `NEW` — order just created, awaiting processing * `COMPLETED` — order fulfilled and transaction created * `DELETED` — order canceled * `WAITING_PAYMENT` — awaiting online payment confirmation * `NEED_ACK` — order requires merchant acknowledgment
    - `orderStatus` 'ACCEPTED' | 'READY' — Order processing status set by the merchant: * `ACCEPTED` — merchant has accepted the order and is preparing it * `READY` — order is ready for pickup or delivery
    - `cash` number — Amount payable in currency units.
    - `points` number — Number of deducted points.
    - `total` number — Total order amount.
    - `certificatePoints` number — Number of deducted certificate points.
    - `customer` CustomerShortInfo — Customer information.
      - `id` integer — Customer ID in the company.
      - `displayName` string — Customer name.
      - `uid` string — Customer UID in the UDS.
      - `membershipTier` MembershipTier — Membership tier (loyalty level) configuration. Defines the discount/cashback rate and automatic upgrade conditions based on spending or referral count.
        - `uid` string — Tier ID.
        - `name` string, required — Tier name.
        - `rate` number, required — Tier rate.
        - `maxScoresDiscount` number, nullable — The maximum discount (in percentage) allowed when redeeming points.
        - `conditions` object — Conditions to upgrade customer tiers automatically.
          - `totalCashSpent` object, nullable — Upgrade to tier when customer reaches target `cashSpent`.
            - `target` number — Amount of cash spent.
          - `effectiveInvitedCount` object, nullable — Upgrade to tier when customer reaches target `effectiveInvitedCount`.
            - `target` integer — Amount of invited count.
    - `delivery` union — Method of receiving the order.
      - object — Receiver information.
        - `receiverName` string — Name of the customer who will pick up the order.
        - `receiverPhone` string — Phone number of the customer who will pick up the order.
        - `userComment` string, nullable — Customer comment on the order.
        - `branch` BranchInfo — Branch information.
          - `id` integer — Branch ID.
          - `displayName` string — Branch name.
        - `type` 'PICKUP' | 'DELIVERY', required — Type of receiving the order.
      - object — Receiver information.
        - `receiverName` string — Name of the customer who will pick up the order.
        - `receiverPhone` string — Phone number of the customer who will pick up the order.
        - `userComment` string, nullable — Customer comment on the order.
        - `deliveryCase` DeliveryCase — Delivery information.
          - `name` string — Delivery name.
          - `value` number — Cost of delivery.
        - `address` string, nullable — Delivery address.
        - `type` 'PICKUP' | 'DELIVERY', required — Type of receiving the order.
    - `onlinePayment` OnlinePayment, nullable — Online payment information.
      - `paymentProvider` 'B2P' | 'CLOUD_PAYMENTS' | 'YOOKASSA' | 'PAYTURE' | 'CUSTOM' — Payment provider type.
      - `id` string — Payment identifier in external payment system.
      - `completed` boolean — Payment status.
    - `paymentMethod` PaymentMethod — Payment information.
      - `type` 'BEST_TO_PAY' | 'CLOUD_PAYMENTS' | 'CASH' | 'MANUAL' | 'CUSTOM' — Payment type.
      - `name` string, nullable — Manual type name.
      - `online` boolean — Is payment online.
      - `providerType` string, nullable — Payment provider type.
    - `items` GoodsOrderItem[] — Items information.
      - `id` integer — Item ID.
      - `externalId` string, nullable — External item identifier.
      - `name` string — Goods name.
      - `variantName` string, nullable — Name of goods variant if this goods type is VARYING_ITEM.
      - `sku` string, nullable — Item stock number.
      - `type` 'ITEM' | 'VARYING_ITEM' — Item type.
      - `qty` integer — Quantity.
      - `price` number — Item price.
      - `offerPrice` number, nullable — Discount price.
      - `skipLoyalty` boolean — Don’t apply loyalty program terms.
      - `measurement` 'PIECE' | 'CENTIMETRE' | 'METRE' | 'MILLILITRE' | 'LITRE' | 'GRAM' | 'KILOGRAM' | 'TON' | 'SQUARE_METRE' | 'CUBIC_METRE' | 'DAY' | 'HOUR' | 'MINUTE' | 'KILOMETRE' — Goods measurement.
      - `dataMatrixCodes` string[], nullable — Data matrix codes (Честный знак) for the item.
      - `deliveryState` DeliveryState, nullable — Delivery state of the order item.
        - `deliveredQty` number — Quantity of delivered items.
        - `canceledQty` number — Quantity of canceled items.
    - `purchase` PurchaseCalc — Loyalty program calculation result for a purchase. Shows discount amounts, point values, final cash payment, and projected cashback. All monetary values are in company currency units.
      - `maxPoints` number — Maximum number of loyalty points the customer can redeem for this purchase, considering their balance and tier limits.
      - `total` number — Original purchase total before any loyalty benefits are applied (in currency units).
      - `skipLoyaltyTotal` number — Portion of the purchase total excluded from loyalty program benefits — no discount applied, no cashback earned (e.g., alcohol, tobacco, gift cards). In currency units.
      - `unredeemableTotal` number — Portion of the purchase total that cannot be paid with loyalty points (in currency units).
      - `discountAmount` number — Discount amount in currency units. Only applicable when baseDiscountPolicy is APPLY_DISCOUNT.
      - `discountPercent` number — Discount as a percentage of the total. Only applicable when baseDiscountPolicy is APPLY_DISCOUNT.
      - `points` number — Number of loyalty points being redeemed (deducted from customer balance) for this purchase.
      - `pointsPercent` number — Points redemption as a percentage of the total purchase amount.
      - `netDiscount` number — Total combined discount from both loyalty discount and point redemption (in currency units).
      - `netDiscountPercent` number — Total combined discount as a percentage (loyalty discount + point redemption).
      - `certificatePoints` number — Number of certificate points deducted (separate from regular loyalty points).
      - `cash` number — Final amount the customer pays in currency after all discounts and point redemptions. Use this value in POST /operations.
      - `cashTotal` number — Total amount to be paid including extra charges like delivery fees (in currency units).
      - `cashBack` number — Loyalty points the customer will earn from this purchase. Applied after operation is completed (may be deferred by deferPointsForDays setting).
      - `extras` object — Additional payments will not be taken into account by the loyalty program.
        - `delivery` number — Delivery cost (in currency units).
      - `maxScoresDiscount` number — The maximum discount (in percentage) allowed when redeeming points.
    - `externalOrder` object, nullable
      - `id` string, nullable — external order id
      - `link` string — external order link

---

[API](https://skmtc.dev/uds/apis/uds-api.md) · [All operations](https://skmtc.dev/uds/apis/uds-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uds/uds-api/revisions/6fbbbc79e671/schema)
