Wayfair APIs - wayfair-contribs/plentymarkets-plugin GitHub Wiki
Introduction
This wiki page covers the Wayfair APIs in use by the plugin in this repository.
In general, the modules that use the Wayfair APIs are found in the src/Core/Api Services directory and the src/Services directory. See the "Reference code" column of the chart found below.
Auth required
Please review the separate page for Authentication / Authorization which covers the API calls for getting the OAuth tokens required for the APIs described here.
Please note that the credentials/tokens used for the "real" Wayfair API endpoint will not work for the separate "Sandbox" endpoint.
Official documentation
The Wayfair APIs may change over time. See the developer documentation for the latest information.
DryRun
As of April 2021, all released versions of the plugin in this repository use a "DryRun" flag when set to "test mode," to help users onboard to Wayfair's platform.
The "DryRun" flag is deprecated and should NOT be used in perpetuity.
The "DryRun" flag is a legacy implementation of "just testing," which is supported by a limited set of the Wayfair API methods (see chart below). Transactions are made with the "real" endpoint (api.wayfair.com) and the return data is exactly the same as a "real" interaction with the API, but no changes are made on the Wayfair back-end, so "DryRun" cannot be used to test a series of stateful transactions.
Sandbox
As of April 2021, no released versions of the plugin in this repository use the "Sandbox" environment.
The Sandbox environment is the current test-time implementation of Wayfair's APIs. Transactions are made with a separate endpoint (sandbox.api.wayfair.com) which uses separate data sources. Unlike the legacy "DryRun" flag, the Sandbox environment is stateful and can be used to test a much larger set of API methods (see chart below).
APIs in Use
Action | API Endpoint | GraphQL Mutation | GraphQL Query | Reference code | "DryRun" flag supported | Available in "Sandbox Environment" | Notes |
---|---|---|---|---|---|---|---|
Accept Orders | v1/graphql | accept | - | AcceptOrderService | Yes | Yes | |
Send ASN to Wayfair | v1/graphql | shipment | - | ASNService | Yes | Yes | |
Fetch Multiple Orders from Wayfair | v1/graphql | - | purchaseOrders - deprecated - see Notes!) | FetchOrderService | See Notes | Yes | Should be using getDropshipPurchaseOrders query. Additionally, the Supplier may need to have "sandbox" environment set up for this to work with "DryRun" |
Fetch Order Details from Wayfair | v1/graphql | - | purchaseOrders - deprecated - see Notes! | PurchaseOrderService | See Notes | Yes | Should be using getDropshipPurchaseOrders query. Additionally, the Supplier may need to have "sandbox" environment set up for this to work with "DryRun" |
Send inventory amounts to Wayfair | v1/graphql | save inventory | - | InventoryService | Yes | Yes | |
Register a Shipment | v1/graphql | register purchaseOrders | - | RegisterPurchaseOrderService | No | Yes | |
Get Shipping Labels for Wayfair Shipping | v1/shipping_label | - | - | SaveOrderDocumentService | No | No | |
Get a Customs Document from Wayfair | v1/customs_document/ | - | - | SaveCustomsInvoiceService | No | No | Relatively new functionality - required for some orders due to "Brexit." Part of registrations, so not available under test. |
Get Packing Slips from Wayfair | v1/packing_slip | - | - | SavePackingSlipService | No | No | Packing slips may not always be available/required. |