Para ajudar os parceiros da Wish que integrarem via API a entender melhor a documentação de API da Wish, que ações podem ser realizadas por meio da API em comparação ao Painel de Controle do Wish para Comerciantes e quais recursos são essenciais para dar suporte ao criar a integração com o Wish, criamos o seguinte guia para auxiliar os nossos parceiros de integração na criação de um aplicativo público via API. Por favor, siga os passos a seguir:
1. Inscreva-se no aplicativo público no ambiente de sandbox do Wish:
1). Partner registers as ERP via the ERP Signup page on Wish sandbox environment. Partner can review Wish API documentation.
2). O parceiro deve enviar um e-mail para (partner-api@wish.com) para avisar a Equipe do Wish sobre o registro de integração via API e a solicitação de acesso ao ambiente de sandbox do Wish.
3). O Wish irá aprovar a inscrição do Parceiro.
4). Assim que o parceiro for aprovado, o parceiro deve fazer o login.
5). Click on Account > Create App.
Create an app Name (use a name that you want merchants to see). Redirect URL is needed for OAuth (it’s where authorization is sent to, you can alter it at any time).
Please note, the details on the above page in Sandbox will not be seen by merchants.
6). Partner will be provided with a client ID and client secret, which will be used by the Partner to do merchant account testing on Wish sandbox (Wish API OAuth process on sandbox requires client ID and client secret).
2. O Parceiro fará um segundo login no Sandbox como um comerciante. Como esse é o ambiente do sandbox, as informações do comerciante inseridas pelo Parceiro não precisam ser de um comerciante real.
1). O parceiro usará um e-mail diferente do usado no registro do ERP para fazer o login no Wish e iniciar o desenvolvimento de um aplicativo público como um comerciante.
2). Associe a conta fictícia do comerciante ao parceiro ERP
a). When logged in as a merchant in the sandbox the merchant should change the URL to https://sandbox.merchant.wish.com/v3/oauth/authorize?client_id={client_id} where {client_id} is the client_id that the ERP generated when they created the public app. This will trigger a prompt asking for the merchant to authorize the ERP to have full access to the merchant store.
b). Assim que o comerciante permitir e autorizar o acesso, a URL será alterada para https://example.redirect.uri.com?code={authorization_code}, onde o redirecionamento foi especificado quando o ERP criou o Aplicativo Público.
c). Nesta etapa, todos os típicos processos do oAuth podem ser seguidos
d). Todas as solicitações de integração da API devem incluir o token de acesso (access_token). Os tokens de acesso são válidos por 30 dias.
e). O refresh_token pode ser usado para obter novos tokens de acesso. Esta ação invalidará o token anterior.
3). O parceiro fará todos os testes no ambiente de sandbox do Wish.
4). Nenhuma aprovação adicional da Wish é necessária para prosseguir.
3. Inscreva-se no aplicativo público no ambiente de produção do Wish
1). Partner registers as ERP in production via the ERP Signup page on Wish production environment.
2). O parceiro envia um e-mail para (partner-api@wish.com) para avisar a Equipe do Wish sobre o registro de integração via API e a solicitação de acesso ao ambiente de produção do Wish.
3). Wish will approve Partner’s application or notify Partner of identified issues.
4). Once approved, you may login and select Account > Create App.
Partner enters information to be published in the Wish App Store. App name and Redirect URL are required fields. Partner may also enter additional information, such as app logo, value proposition, description, website and/or support email, which need to undergo a review process as they will be visible to merchants.
If this additional information is entered, the app will still be created and be able to integrate with the API, however, these fields will only be published in the Wish App Store once they are approved. In the meantime, the approval status of these additional information fields can be viewed as shown below.
You can view and edit all information submitted above (required or additional) by navigating to Account > App Settings. If the details in the additional information fields are edited or deleted, they will need to undergo the review process again.
5). Review Wish Production environment API documentation
6). Partner completes OAuth process.
7). Partners need to turn on their integration in Wish production environment and remember to point API calls to Wish production environment instead of sandbox environment.
4. Os comerciantes devem registrar uma conta de loja exclusiva no Painel de Controle do Wish para Comerciantes e autorizar o ERP a enviar/receber dados de/para a loja do comerciante no Wish.
1). Como parte do registro da conta, os comerciantes precisarão submeter as informações de identificação pessoal (número do CPF e uma cópia do RG ou CNH), e informações da loja, incluindo o número e cópia do CNPJ, que serão aprovados pela Wish.
2). As contas comerciais serão aprovadas por um gerente de contas da Wish.
3). Merchants then need to authorize ERP through one of the following methods:
a). Merchant registers for an account at the ERP of their choice.
(i) Merchant selects Wish authorization link from ERP interface to redirect them to an OAuth Authorization page where they can authorize the ERP.
• The link should be as follows with the ERPs unique production client ID: https://merchant.wish.com/v3/oauth/authorize?client_id={PRODUCTION_CLIENT_ID}
(ii) Merchant clicks ‘Authorize’ to redirect them to the ERP specified "Redirect URI" with an authorization code. ERP will use this authorization code to call Wish APIs to get access token.
b). Merchant discovers ERP on the Wish App Store (NOTE: this process is not yet launched, but ERPs should be able to handle this process in preparation for its future launch):
(i) Merchant selects ‘Add App’ to redirect them to an OAuth Authorization page where they can authorize the ERP.
(ii) Merchant clicks ‘Authorize’ to redirect them to the ERP specified "Redirect URI" with an authorization code. ERP will use this authorization code to call Wish APIs to get access token.
• The connection may not be complete if the ERP specified “Redirect URI” page cannot handle the case where the merchant is not signed in and/or doesn't have an account with the ERP.
• To complete the connection, prompt the merchant to log in or sign up for your ERP. Then, carry the authorization code forward in the url, and complete the OAuth process once the merchant is logged in or has created an account.
c). Authorization is now complete.
d). If at any point the merchant intends to de-authorize the ERP, the merchant can do so from Wish Merchant Dashboard at Account > Settings > API Settings.
Please note to improve security for public apps, partners are now able to add up to 2 OAuth client secrets for their public apps. Simply navigate to your App Settings page and click “Add second key” under the first client secret to add a second one:
If needed, partners may also rotate the 2 client secrets by deleting one and adding a new one, in case their client secrets have been compromised.
Note: For links to documentation, tips, tutorials, and more check out the Wish Developers Page.
Comentários
0 comentário
Por favor, entrar para comentar.