Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

223
Visualizações
WooCommerce API: Passing email address in the right way

I try to fetch some data from the WooCommerce API with:

let currentUserEmail = "test+test@my-url.com"
let apiURL = 'https://www.url.com/wc-api/v3/customers/email/' + currentUserEmail;

or

let currentUserEmail = "test+test@my-url.com"
let apiURL = 'https://www.url.com/wc-api/v3/customers/email/' + encodeURIComponent(currentUserEmail);

In both for this email address case I get a 404 error. I think this is because of the + sign. How can I pass the email address correctly to send the get request in the right way?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Email is not it's own endpoint but instead a parameter of customers so you should do this instead

let currentUserEmail = "test+test@my-url.com"
let apiURL = 'https://www.url.com/wc-api/v3/customers?email=' + currentUserEmail;

You can find documentation of all parameters available here: https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-customers

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda