Zum Hauptinhalt springen
PUT
/
crm
/
v3
/
pipelines
/
{objectType}
/
{pipelineId}
Remplacer un pipeline
curl --request PUT \
  --url https://api.hubapi.com/crm/v3/pipelines/{objectType}/{pipelineId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "label": "My replaced pipeline",
  "displayOrder": 0,
  "stages": [
    {
      "label": "In Progress",
      "displayOrder": 0,
      "metadata": {
        "ticketState": "OPEN"
      }
    },
    {
      "label": "Done",
      "displayOrder": 1,
      "metadata": {
        "ticketState": "CLOSED"
      }
    }
  ]
}'
{
  "label": "My ticket pipeline",
  "displayOrder": 0,
  "createdAt": "2019-10-30T03:30:17.883Z",
  "updatedAt": "2019-12-07T16:50:06.678Z",
  "archived": false,
  "id": "812723471",
  "stages": [
    {
      "label": "In Progress",
      "displayOrder": 0,
      "metadata": {
        "ticketState": "OPEN"
      },
      "createdAt": "2019-10-30T03:30:17.883Z",
      "updatedAt": "2019-12-07T16:50:06.678Z",
      "archived": false,
      "id": "1234912"
    },
    {
      "label": "Done",
      "displayOrder": 0,
      "metadata": {
        "ticketState": "CLOSED"
      },
      "createdAt": "2019-10-30T03:30:17.883Z",
      "updatedAt": "2019-12-07T16:50:06.678Z",
      "archived": false,
      "id": "1234914"
    }
  ]
}

Produits pris en charge

Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing Hub -Gratuit
Sales HubSales Hub -Gratuit
Service HubService Hub -Gratuit
Content HubContent Hub -Starter
Cette API requiert l'une des portées suivantes :
crm.objects.carts.write
crm.objects.orders.write
crm.objects.users.write
crm.pipelines.orders.write
crm.schemas.appointments.write
crm.schemas.carts.write
crm.schemas.commercepayments.write
crm.schemas.companies.write
crm.schemas.contacts.write
crm.schemas.courses.write
crm.schemas.deals.write
crm.schemas.invoices.write
crm.schemas.listings.write
crm.schemas.orders.write
crm.schemas.services.write
crm.schemas.subscriptions.write
e-commerce
tickets
tickets.highly_sensitive.v2
tickets.sensitive.v2

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

objectType
string
required

Le type d'objet du pipeline en cours de remplacement (par exemple, transactions ou tickets)

pipelineId
string
required

Identifiant unique du pipeline à remplacer.

Query Parameters

validateDealStageUsagesBeforeDelete
boolean
default:false

Indique s'il faut valider les utilisations des étapes de transaction avant de supprimer le pipeline.

validateReferencesBeforeDelete
boolean
default:false

Indique s'il faut valider les références avant de supprimer le pipeline.

Body

application/json

An input used to create or replace a pipeline's definition.

displayOrder
integer
required

L'ordre d'affichage de ce pipeline. Si deux pipelines ont un « displayOrder » correspondant, ils seront triés par ordre alphabétique par libellé.

label
string
required

Un libellé unique utilisé pour organiser les pipelines dans l'interface utilisateur de HubSpot

stages
object[]
required

Les entrées de l'étape de pipeline utilisées pour créer le nouveau pipeline ou le remplacer.

Response

successful operation

A pipeline definition.

archived
boolean
required

Si le pipeline est archivé.

createdAt
string<date-time>
required

The date the pipeline was created. The default pipelines will have createdAt = 0.

displayOrder
integer
required

The order for displaying this pipeline. If two pipelines have a matching displayOrder, they will be sorted alphabetically by label.

id
string
required

A unique identifier generated by HubSpot that can be used to retrieve and update the pipeline.

label
string
required

A unique label used to organize pipelines in HubSpot's UI

stages
object[]
required

Les étapes associées au pipeline. Elles peuvent être récupérées et mises à jour via les points de terminaison des étapes du pipeline.

updatedAt
string<date-time>
required

La date de la dernière mise à jour du pipeline.

archivedAt
string<date-time>

La date à laquelle le pipeline a été archivé. archivedAt ne sera présent que si le pipeline est archivé.