Atualizar customer pelo id
curl --request PATCH \
--url https://api.malga.io/v1/customers/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>"
}
'const options = {
method: 'PATCH',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', phoneNumber: '<string>'})
};
fetch('https://api.malga.io/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/customers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Customers
Atualizar customer pelo id
PATCH
/
v1
/
customers
/
{id}
Atualizar customer pelo id
curl --request PATCH \
--url https://api.malga.io/v1/customers/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"name": "<string>",
"phoneNumber": "<string>"
}
'const options = {
method: 'PATCH',
headers: {
'X-Client-Id': '<api-key>',
'X-Api-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', phoneNumber: '<string>'})
};
fetch('https://api.malga.io/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.malga.io/v1/customers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"phoneNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-Id", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Path Parameters
Id do customers que deseja alterar
Body
application/json
Response
200
The record has been successfully updated.
Related topics
Atualizar webhook pelo idDeletar customer pelo idRealizar nova cobrançaAtualizar clienteWas this page helpful?
⌘I