πSapo
the Sapo node provides solutions for developers to synchronize product, order, customer, and transaction data... between Sapo and other systems; it allows you to set up most of the features from your applications on the CMS platform. Web app or third-party software compatible with Sapo's platform.. These solutions are suitable for both normal websites (websites of an individual or company) and e-commerce platforms with many stores.
On this page, you'll find a list of operations the Sapo node supports and links to more resources.
Authentication: Refer to Sapo API for guidance on setting up authentication about Sapo API.
Basic Operations
Customer
LαΊ₯y vα» danh sΓ‘ch tαΊ₯t cαΊ£ cΓ‘c Customer
LαΊ₯y vα» mα»t Customer
TαΊ‘o mα»i mα»t Customer
Chα»nh sα»a mα»t Customer
XΓ³a mα»t Customer khα»i cΖ‘ sα» dα»― liα»u
LαΊ₯y vα» tα»ng sα» tαΊ₯t cαΊ£ cΓ‘c Customer
TΓ¬m kiαΊΏm ΔΖ‘n hΓ ng cα»§a Customer
Customer Address
LαΊ₯y ra danh sΓ‘ch tαΊ₯t cαΊ£ cΓ‘c CustomerAddresses
LαΊ₯y ra mα»t Customer Address
TαΊ‘o mα»i mα»t CustomerAddress
Chα»nh sα»a mα»t CustomerAddress ΔΓ£ tα»n tαΊ‘i
XΓ³a CustomerAddress khα»i cΖ‘ sα» dα»― liα»u
ΔαΊ·t Δα»a chα» mαΊ·c Δα»nh cho khΓ‘ch hΓ ng
Customer Collection
LαΊ₯y vα» danh sΓ‘ch tαΊ₯t cαΊ£ cΓ‘c CustomCollection
LαΊ₯y vα» tα»ng sα» cΓ‘c CustomCollection
LαΊ₯y vα» mα»t CustomCollection
TαΊ‘o mα»i mα»t CustomCollection
Chα»nh sα»a mα»t CustomCollection
XΓ³a mα»t CustomCollection ra khα»i cΖ‘ sα» dα»― liα»u
Discount Code
TαΊ‘o mα»i mα»t DiscountCode
CαΊp nhαΊt mα»t DiscountCode ΔΓ£ tα»n tαΊ‘i
LαΊ₯y ra mα»t danh sΓ‘ch mΓ£ khuyαΊΏn mΓ£i
LαΊ₯y ra mα»t DiscountCode
XΓ³a mα»t DiscountCode
Event
LαΊ₯y danh sΓ‘ch Event
LαΊ₯y mα»t Event
LαΊ₯y tα»ng sα» Event
Fulfillment
LαΊ₯y danh sΓ‘ch tαΊ₯t cαΊ£ cΓ‘c Fulfillment
LαΊ₯y tα»ng sα» Fulfillment
LαΊ₯y mα»t Fulfillment
TαΊ‘o mα»i mα»t Fulfillment
CαΊp nhαΊt mα»t Fulfillment
HoΓ n thΓ nh mα»t Fulfillment
Hα»§y mα»t Fulfillment
Metafield
LαΊ₯y toΓ n bα» Metafields trong Shop
LαΊ₯y toΓ n bα» Metafields cα»§a mα»t sαΊ£n phαΊ©m
LαΊ₯y toΓ n bα» Metafields cα»§a αΊ£nh sαΊ£n phαΊ©m
LαΊ₯y tα»ng sα» metafield cα»§a shop
LαΊ₯y tα»ng sα» metafield cα»§a mα»t sαΊ£n phαΊ©m
LαΊ₯y mα»t metafield bαΊ±ng ID
LαΊ₯y mα»t metafield cα»§a sαΊ£n phαΊ©m bαΊ±ng ID
TαΊ‘o mα»i mα»t metafield
TαΊ‘o mα»i mα»t metafield cho mα»t sαΊ£n phαΊ©m
CαΊp nhαΊt metafield
CαΊp nhαΊt mα»t metafield cα»§a sαΊ£n phαΊ©m
XΓ³a mα»t metafield
XΓ³a mα»t metafield cα»§a sαΊ£n phαΊ©m
Order
LαΊ₯y danh sΓ‘ch Order
LαΊ₯y mα»t Order
LαΊ₯y tα»ng sα» Order
LΖ°u trα»― mα»t Order
Bα» lΖ°u trα»― mα»t Order
Hα»§y mα»t Order
TαΊ‘o mα»i mα»t Order
CαΊp nhαΊt mα»t Order
XΓ³a mα»t Order khα»i cΖ‘ sα» dα»― liα»u
Product
LαΊ₯y danh sΓ‘ch tαΊ₯t cαΊ£ Product
LαΊ₯y tα»ng sα» Product
LαΊ₯y mα»t Product
TαΊ‘o mα»i mα»t Product
Chα»nh sα»a mα»t Product
XΓ³a mα»t Product khα»i cΖ‘ sα» dα»― liα»u
Product Variant
LαΊ₯y vα» danh sΓ‘ch cΓ‘c Product Variant
LαΊ₯y vα» tα»ng sα» cΓ‘c Prodcut Variant
LαΊ₯y vα» mα»t Product Variant
TαΊ‘o mα»i mα»t Product Variant
Chα»nh sα»a mα»t Product Variant
XΓ³a mα»t Product Variant khα»i cΖ‘ sα» dα»― liα»u
Refund
LαΊ₯y mα»t Refund
SmartCollection
LαΊ₯y danh sΓ‘ch cΓ‘c SmartCollection
LαΊ₯y tα»ng sα» SmartCollection
LαΊ₯y mα»t SmartCollection
TαΊ‘o mα»i mα»t SmartCollection
CαΊp nhαΊt mα»t SmartCollection
XΓ³a mα»t SmartCollection khα»i cΖ‘ sα» dα»― liα»u
Store
LαΊ₯y mα»t Store
Transaction
LαΊ₯y danh sΓ‘ch cΓ‘c Transaction
LαΊ₯y tα»ng sα» Transaction
LαΊ₯y mα»t Transaction
TαΊ‘o mα»i mα»t Transaction
Carrier Service
TαΊ‘o mα»i mα»t Carrier Service
CαΊp nhαΊt mα»t Carrier Service ΔΓ£ tα»n tαΊ‘i
LαΊ₯y ra danh sΓ‘ch Carrier Service
LαΊ₯y ra mα»t Carrier Service
XΓ³a mα»t Carrier Service
Example Usage
This workflow allows you can create a new product in your store. This example usage workflow would use the following nodes.
If you use private apps authentication type. Your workflow is. - Start β Sapo.

If you use OAuth authentication type. Your workflow is. - Start β Sapo Authentication β Sapo.

1. Start Node
The start node exists by default when you create a new workflow.
2. Sapo Authentication
To use Sapo Authentication node, you must have partner account, if you don't have partner account yet, register at https://developers.sapo.vn/services/partners/auth/register.
Then you will log in to your partner account https://developers.sapo.vn/services/partners/auth/login
If you use Private Apps, see this guide https://support.sapo.vn/ung-dung-rieng-private-apps.
note: If you use Private app authentication type please skip this section and move to section 3. Sapo Node
If you use OAuth, see the instructions below:
Click to open the Apps list page in the Partner management screen
Choose "TαΊ‘o α»©ng dα»₯ng"

Create new app
Provide app information


Click "LΖ°u" to save your app

After creating an app, the browser will redirect to a screen displaying detailed information about your app.

Storage app information above to use in the next step(Callback URL, API key, Secret key).
Starting to create a new store for you. Click "Development stores" section in your sapo partner web and click "TαΊ‘o development store" to create your store.

Provide your store name and password and click "LΖ°u"

Click "ΔΔng nhαΊp" to access your store

Your store name is follow this format https://{YOUR-STORE-NAME}.mysapo.net/admin

Back to n8n workflow
You will use the Sapo Authentication node to get an access token to use other actions in the Sapo node. Before that, you had to create new credentials to get the code.
Click on the Add node or drag to connect button and enter Sapo Authentication in the search nodes box.
Select Create new Credential at Credential to connect with field.

The screenshots below are required fields for your connect information needed to get the code.

Client ID: is your API key in your app.
Client Secret: is your Secret key in your app.
Store Name: is your Store Name.
Redirect Uri: is your Callback URL in your app.
After providing your Client ID, Client Secret, Store Name, and Redirect URI and clicking Connect my account button the permissions window appears and shows the permissions for your app.

After that, you can click "CΓ i ΔαΊ·t" to redirect your Redirect URI attached to the code. Your code is the string between "code=" and "&hmac". You can copy it to use in the next step.

After getting a code you can close the get code window and back to the credential screen. Now you can turn it off and just click close when Close without connecting popup appears because Sapo doesn't have Authorization server support OAuth 2.0 protocol. This will not affect the further processes.

Next, you will paste code that was provided in the previous step to the Code field. After that, you will click the Execute node button to get access Token.

After executing Sapo Authentication node:

3. Sapo node
You will use the TαΊ‘o mα»i mα»t Product action in the Sapo node to create a new product in your store that includes the information you just entered.
Click on the Add node or drag to connect button and enter Sapo in the search nodes box.
Search TαΊ‘o mα»i mα»t Product in the search Sapo Actions box.
Select Create new credential at Credential to connect with field.

You will choose Authentication type Private App or OAuth
If you use Private App provide information about your app
Client ID: is your API key in your app.
Client Secret: is your Secret key in your app.
Store Name: is your Store Name.

Click "Save" to store your credentials
If you use OAuth provide accessToken you have taken of the previous step.
Access Token: is access_token you have taken of the Sapo Authentication node.
Store Name: is your Store Name.

Click "Save" to store your credentials.
Now you can start creating a new product. This example will use the OAuth authentication type.
Enter the value of fields that you want to set product information.
Click Execute node to run a node.
The screenshots below are examples of input fields for product information creation.



After executing TαΊ‘o mα»i mα»t Product action of Sapo node:

Last updated