πŸ“–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.

circle-info

Authentication: Refer to Sapo APIarrow-up-right 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. - Startarrow-up-right – Sapo.

Workflow if user have an access token

If you use OAuth authentication type. Your workflow is. - Startarrow-up-right – Sapo Authentication – Sapo.

Workflow if the user doesn't have an access token yet

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/registerarrow-up-right.

Then you will log in to your partner account https://developers.sapo.vn/services/partners/auth/loginarrow-up-right

If you use Private Apps, see this guide https://support.sapo.vn/ung-dung-rieng-private-appsarrow-up-right.

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:

  1. Choose "TαΊ‘o α»©ng dα»₯ng"

  1. 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/adminarrow-up-right

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.

Create your new credentials

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

  1. 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.

Private app credentials

Click "Save" to store your credentials

  1. 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.

OAuth credentials

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