Atualizar publicação
PUT
/api/seller/external/v1/hub/post/{id}
curl --request PUT \ "https://api.spelt.com.br/api/seller/external/v1/hub/post/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/hub/post/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "PUT", headers,}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/hub/post/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF';$response = $client->put( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/hub/post/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF'headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('PUT', url, headers=headers)response.json()Patch parcial dos mesmos campos do POST; publish: true publica. Editar uma publicação já publicada muda a página
na hora. O external_ref pode ser definido depois, se ainda não estiver em uso na conta.
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”id
required
string
The ID of the post.
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
id
string
title
string
status
string
profile_enabled
boolean
Example
{ "data": { "id": "01J...", "title": "O que é MRR", "status": "published", "profile_enabled": true }}Media typeapplication/json
object
message
string
Example
{ "message": "Esta publicação foi removida pelo Spelt e não pode ser editada nem republicada."}Media typeapplication/json
object
error
string
Example
{ "error": "Recurso não encontrado"}Media typeapplication/json
object
message
string
errors
object
canonical_url
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "canonical_url": [ "..." ] }}