API Produk & Keuangan

Melalui API ini, Anda akan mendapatkan informasi yang saling terintegrasi berkaitan Produk yang telah di beli oleh pengguna dan laporan keuangan.

Properti Pesanan

Attribute
Type
Description

id

integer

Unique identifier for the resource.READ-ONLY

parent_id

integer

Parent order ID.

number

string

Order number.READ-ONLY

order_key

string

Order key.READ-ONLY

created_via

string

Shows where the order was created.READ-ONLY

version

string

Version of WooCommerce which last updated the order.READ-ONLY

status

string

Order status. Options: pending, processing, on-hold, completed, cancelled, refunded, failed and trash. Default is pending.

currency

string

Currency the order was created with, in ISO format. Options: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTC, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, IRT, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PRB, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SRD, SSP, STD, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR and ZMW. Default is USD.

date_created

date-time

The date the order was created, in the site's timezone.READ-ONLY

date_created_gmt

date-time

The date the order was created, as GMT.READ-ONLY

date_modified

date-time

The date the order was last modified, in the site's timezone.READ-ONLY

date_modified_gmt

date-time

The date the order was last modified, as GMT.READ-ONLY

discount_total

string

Total discount amount for the order.READ-ONLY

discount_tax

string

Total discount tax amount for the order.READ-ONLY

shipping_total

string

Total shipping amount for the order.READ-ONLY

shipping_tax

string

Total shipping tax amount for the order.READ-ONLY

cart_tax

string

Sum of line item taxes only.READ-ONLY

total

string

Grand total.READ-ONLY

total_tax

string

Sum of all taxes.READ-ONLY

prices_include_tax

boolean

True the prices included tax during checkout.READ-ONLY

customer_id

integer

User ID who owns the order. 0 for guests. Default is 0.

customer_ip_address

string

Customer's IP address.READ-ONLY

customer_user_agent

string

User agent of the customer.READ-ONLY

customer_note

string

Note left by customer during checkout.

billing

object

shipping

object

payment_method

string

Payment method ID.

payment_method_title

string

Payment method title.

transaction_id

string

Unique transaction ID.

date_paid

date-time

The date the order was paid, in the site's timezone.READ-ONLY

date_paid_gmt

date-time

The date the order was paid, as GMT.READ-ONLY

date_completed

date-time

The date the order was completed, in the site's timezone.READ-ONLY

date_completed_gmt

date-time

The date the order was completed, as GMT.READ-ONLY

cart_hash

string

MD5 hash of cart items to ensure orders are not modified.READ-ONLY

meta_data

array

line_items

array

tax_lines

array

shipping_lines

array

fee_lines

array

coupon_lines

array

refunds

array

set_paid

boolean

Define if the order is paid. It will set the status to processing and reduce stock items. Default is false.

Ambil pesanan

API ini memungkinkan Anda mengambil dan melihat pesanan tertentu.

HTTP request

GET

/wp-json/wc/v3/orders/<id>

JSON response example:

{
  "id": 727,
  "parent_id": 0,
  "number": "727",
  "order_key": "wc_order_58d2d042d1d",
  "created_via": "rest-api",
  "version": "3.0.0",
  "status": "processing",
  "currency": "USD",
  "date_created": "2017-03-22T16:28:02",
  "date_created_gmt": "2017-03-22T19:28:02",
  "date_modified": "2017-03-22T16:28:08",
  "date_modified_gmt": "2017-03-22T19:28:08",
  "discount_total": "0.00",
  "discount_tax": "0.00",
  "shipping_total": "10.00",
  "shipping_tax": "0.00",
  "cart_tax": "1.35",
  "total": "29.35",
  "total_tax": "1.35",
  "prices_include_tax": false,
  "customer_id": 0,
  "customer_ip_address": "",
  "customer_user_agent": "",
  "customer_note": "",
  "billing": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US",
    "email": "john.doe@example.com",
    "phone": "(555) 555-5555"
  },
  "shipping": {
    "first_name": "John",
    "last_name": "Doe",
    "company": "",
    "address_1": "969 Market",
    "address_2": "",
    "city": "San Francisco",
    "state": "CA",
    "postcode": "94103",
    "country": "US"
  },
  "payment_method": "bacs",
  "payment_method_title": "Direct Bank Transfer",
  "transaction_id": "",
  "date_paid": "2017-03-22T16:28:08",
  "date_paid_gmt": "2017-03-22T19:28:08",
  "date_completed": null,
  "date_completed_gmt": null,
  "cart_hash": "",
  "meta_data": [
    {
      "id": 13106,
      "key": "_download_permissions_granted",
      "value": "yes"
    }
  ],
  "line_items": [
    {
      "id": 315,
      "name": "Woo Single #1",
      "product_id": 93,
      "variation_id": 0,
      "quantity": 2,
      "tax_class": "",
      "subtotal": "6.00",
      "subtotal_tax": "0.45",
      "total": "6.00",
      "total_tax": "0.45",
      "taxes": [
        {
          "id": 75,
          "total": "0.45",
          "subtotal": "0.45"
        }
      ],
      "meta_data": [],
      "sku": "",
      "price": 3
    },
    {
      "id": 316,
      "name": "Ship Your Idea &ndash; Color: Black, Size: M Test",
      "product_id": 22,
      "variation_id": 23,
      "quantity": 1,
      "tax_class": "",
      "subtotal": "12.00",
      "subtotal_tax": "0.90",
      "total": "12.00",
      "total_tax": "0.90",
      "taxes": [
        {
          "id": 75,
          "total": "0.9",
          "subtotal": "0.9"
        }
      ],
      "meta_data": [
        {
          "id": 2095,
          "key": "pa_color",
          "value": "black"
        },
        {
          "id": 2096,
          "key": "size",
          "value": "M Test"
        }
      ],
      "sku": "Bar3",
      "price": 12
    }
  ],
  "tax_lines": [
    {
      "id": 318,
      "rate_code": "US-CA-STATE TAX",
      "rate_id": 75,
      "label": "State Tax",
      "compound": false,
      "tax_total": "1.35",
      "shipping_tax_total": "0.00",
      "meta_data": []
    }
  ],
  "shipping_lines": [
    {
      "id": 317,
      "method_title": "Flat Rate",
      "method_id": "flat_rate",
      "total": "10.00",
      "total_tax": "0.00",
      "taxes": [],
      "meta_data": []
    }
  ],
  "fee_lines": [],
  "coupon_lines": [],
  "refunds": [],
  "_links": {
    "self": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders/727"
      }
    ],
    "collection": [
      {
        "href": "https://example.com/wp-json/wc/v3/orders"
      }
    ]
  }
}

Selengkapnya tutorial anda dapat kunjungi link ini : event.ldp-pormiki.co.id Jika anda membutuhkan akses kunci API Private kami, silahkan hubungi kami melalui kontak bantuan website atau email sekre@ldp-pormiki.co.id, kami dengan senang hati akan membagikan kunci API kami ke anda.

Last updated