Conversions API Gateway untuk Multiple Accounts Control Plane API: Referensi

Pengelolaan Pixel

Buat Koneksi Pixel

Melakukan onboarding Meta Pixel baru ke Conversions API Gateway.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation AddNewPixelModalMutation(
    $tenantId: ID!
    $input: PixelConnectionCreationInput!
) {
    tenantMutations(tenantId: $tenantId) {
          signalMutations {
              setupPixelSignalConfig(input: $input) {
              id
              domains
              connectionId
              connectionStatus {
                  id
                  accessTokenAvailable
                  active
                  connected
                  accessKey
                  eventBridgeActive
                  publishingEnabled
                  apiErrorCode
                  pixelID
                  pixelName
                  lastPublished
                  totalEventsPublished
                  lastReceived
                  totalEventsReceived
                  }
              }
          }
     }
}
_________________________________________________________________________________________________________    
tenantId: ID!
_________________________________________________________________________________________________________
input PixelConnectionCreationInput {
  businessId: String!
  pixelId: String!
  accessToken: String!
  apiVersion: String
  externalId: String!
  name: String
}      
     

Kolom

KolomDeskripsi

tenantId
ID

Wajib

Pengidentifikasi unik akun

PixelConnectionCreationInput

KolomDeskripsi

businessId
String

Wajib

ID bisnis akun

pixelId
String

Wajib

ID Pixel yang perlu diintegrasikan

accessToken
String

Wajib

Token akses dari pengaturan MBE atau dibuat secara manual dari Pengelola Peristiwa

apiVersion
String

Opsional

Versi API terbaru untuk Graph API

externalId
String

Wajib

Ini harus sama dengan external_business_id di objek pengaturan

name
String

Opsional

Nama Pixel


Memberikan

KolomDeskripsi

signalConfig
SignalConfig

Konfigurasi Pixel


Kode Kesalahan

KodeDeskripsi

400

Input yang dimasukkan tidak valid

401

Pengguna tidak berwenang untuk menyiapkan konfigurasi Pixel

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation AddNewPixelModalMutation(
   $tenantId: ID!
   $input: PixelConnectionCreationInput!
) {
   tenantMutations(tenantId: $tenantId) {
          signalMutations {
              setupPixelSignalConfig(input: $input) {
              id
              domains
              connectionId
              connectionStatus {
                  id
                  accessTokenAvailable
                  active
                  eventBridgeActive
                  publishingEnabled
                  apiErrorCode
                  pixelID
                  pixelName
                  lastPublished
                  totalEventsPublished
                  lastReceived
                  totalEventsReceived
                  }
              }
          }
   }
}
     

Variabel

{
   "tenantId": "IaoreXfj",
   "input": {
       "pixelId": "18904456377094531",
       "businessId": "2840127409433732",
       "accessToken": "<accessToken>",
       "apiVersion": "v14.0",
       "externalId": "633612748410ba6e902"
   }
}
     

Contoh Tanggapan

{
   "data": {
       "tenantMutations": {
           "signalMutations": {
               "setupPixelSignalConfig": {
                   "id": "SignalConfig:18904456377094531",
                   "domains": [],
                   "connectionId": "18904456377094531",
                   "connectionStatus": {
                       "id": "ConnectionStatus:18904456377094531",
                       "accessTokenAvailable": true,
                       "active": true,
                       "eventBridgeActive": true,
                       "publishingEnabled": true,
                       "apiErrorCode": null,
                       "pixelID": "18904456377094531",
                       "pixelName": null,
                       "lastPublished": 0.0,
                       "totalEventsPublished": 0.0,
                       "lastReceived": 0.0,
                       "totalEventsReceived": 0.0
                   }
               }
           }
       }
   }
}
     

Menghapus Koneksi Pixel

Menghapus Pixel yang ada dari Gateway.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation DeleteDataSourceModalMutation(
  $id: ID!
  $tenantId: ID!
) {
  tenantMutations(tenantId: $tenantId) {
    signalMutations {
      deleteDataSource(id: $id)
    }
  }
}
_________________________________________________________________________________________________________    
id: ID!
_____________________________________________________________________________________________________________
      
tenantId: ID!   
     

Kolom

KolomDeskripsi

id
ID

Wajib

ID Pixel

tenantId
ID

Wajib
Pengidentifikasi unik akun


Memberikan

KolomDeskripsi

Boolean

Menunjukkan apakah Pixel berhasil dihapus


Kode Kesalahan

KodeDeskripsi

401

Pengguna tidak berwenang menghapus konfigurasi Pixel.

404

Pixel tidak ditemukan.

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation DeleteDataSourceModalMutation(
 $id: ID!
 $tenantId: ID!
) {
 tenantMutations(tenantId: $tenantId) {
   signalMutations {
     deleteDataSource(id: $id)
   }
 }
}
     

Variabel

{
   "id":"18904456377094531",
   "tenantId":"IaoreXfj"
}
     

Contoh Tanggapan

{
   "data": {
       "tenantMutations": {
           "signalMutations": {
               "deleteDataSource": true
           }
       }
   }
}
     

Mengaktifkan/Menonaktifkan Gateway dari Menerima Peristiwa Pixel

Mengubah status penerimaan peristiwa Pixel Gateway.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation updateSignalConfigStatusMutation(
    $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) {
  tenantMutations(tenantId: $tenantId) {
    signalMutations {
      updateSignalConfigEventsStatus(id: $id, input: $input) {
        success
        connectionStatus {
            id
            accessTokenAvailable
            active
            connected
            accessKey
            eventBridgeActive
            publishingEnabled
            apiErrorCode
            pixelID
            pixelName
            lastPublished
            totalEventsPublished
            lastReceived
            totalEventsReceived
        }
      }
    }
  }
}
_________________________________________________________________________________________________________    
id: ID!
_____________________________________________________________________________________________________________
      
tenantId: ID!
________________________________________________________________________________________________________
input SignalConfigStatusInput {
  status: Int!
}            
     

Kolom

KolomDeskripsi

id
ID

Wajib

ID Pixel yang perlu dikonfigurasi

tenantId
ID

Wajib
Pengidentifikasi unik akun


SignalConfigStatusInput

KolomDeskripsi

status
Int

Wajib


NilaiDeskripsi

0

Nonaktifkan

1

Aktifkan


Memberikan

UpdateSignalConfigStatusPayload

KolomDeskripsi

success
Boolean

Menunjukkan apakah operasi pada Pixel berhasil

connectionStatus
ConnectionStatus

Konfigurasi koneksi Pixel


Kode Kesalahan

KodeDeskripsi

401

Tidak berwenang melakukan tindakan pada Pixel

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation updateSignalConfigStatusMutation(
   $id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) {
 tenantMutations(tenantId: $tenantId) {
   signalMutations {
     updateSignalConfigEventsStatus(id: $id, input: $input) {
       success
       connectionStatus {
         id
         connected
         active
         eventBridgeActive
         publishingEnabled
       }
     }
   }
 }
}
     

Variabel

{
   "id": "18904456377094531",
   "tenantId": "IaoreXfj",
   "input": {
       "status": 1
       }
}
     

Contoh Tanggapan

{
   "data": {
       "tenantMutations": {
           "signalMutations": {
               "updateSignalConfigEventsStatus": {
                   "success": true,
                   "connectionStatus": {
                       "id": "ConnectionStatus:18904456377094531",
                       "connected": true,
                       "active": true,
                       "eventBridgeActive": true,
                       "publishingEnabled": true
                   }
               }
           }
       }
   }
}
     

Mengaktifkan/Menonaktifkan Status Penerbitan Peristiwa Pixel

Mengubah status penerbitan peristiwa Pixel. Jika dinonaktifkan, Gateway akan menghapus peristiwa yang diterima dan tidak menerbitkannya ke Meta.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation updateSignalConfigCapiPublishMutation(
$id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) {
 tenantMutations(tenantId: $tenantId) {
   signalMutations {
     updateSignalConfigCapiPublish(id: $id, input: $input) {
       success
       connectionStatus {
           id
           accessTokenAvailable
           active
           connected
           accessKey
           eventBridgeActive
           publishingEnabled
           apiErrorCode
           pixelID
           pixelName
           lastPublished
           totalEventsPublished
           lastReceived
           totalEventsReceived
       }
     }
   }
 }
}
_________________________________________________________________________________________________________    
id: ID!
_____________________________________________________________________________________________________________
      
tenantId: ID!
________________________________________________________________________________________________________
input SignalConfigStatusInput {
  status: Int!
}            
     

Kolom

KolomDeskripsi

id
ID

Wajib

ID Pixel yang perlu dikonfigurasi

tenantId
ID

Wajib
Pengidentifikasi unik akun


SignalConfigStatusInput

KolomDeskripsi

status
Int

Wajib


NilaiDeskripsi

0

Nonaktifkan

1

Aktifkan


Memberikan

UpdateSignalConfigStatusPayload

KolomDeskripsi

success
Boolean

Menunjukkan apakah operasi pada Pixel berhasil

connectionStatus
ConnectionStatus

Konfigurasi koneksi Pixel


Kode Kesalahan

KodeDeskripsi

401

Tidak berwenang melakukan tindakan pada Pixel

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation updateSignalConfigCapiPublishMutation(
$id: ID!, $tenantId: ID!, $input: SignalConfigStatusInput!) {
 tenantMutations(tenantId: $tenantId) {
   signalMutations {
     updateSignalConfigCapiPublish(id: $id, input: $input) {
       success
       connectionStatus {
         id
         active
         eventBridgeActive
         publishingEnabled
       }
     }
   }
 }
}
     

Variabel

{
   "id": "18904456377094531",
   "tenantId": "IaoreXfj",
   "input": {
       "status": 0
       }
}
     

Contoh Tanggapan

{
   "data": {
       "tenantMutations": {
           "signalMutations": {
               "updateSignalConfigCapiPublish": {
                   "success": true,
                   "connectionStatus": {
                       "id": "ConnectionStatus:18904456377094531",
                       "active": false,
                       "eventBridgeActive": true,
                       "publishingEnabled": false
                   }
               }
           }
       }
   }
}
     

Mengaktifkan/Menonaktifkan Status Penerbitan Peristiwa Pixel berdasarkan Nama Peristiwa

Mengubah status penerbitan peristiwa Pixel berdasarkan nama peristiwa dan ID Pixel. Jika dinonaktifkan, Gateway akan menghapus peristiwa ini dan tidak menerbitkannya ke Meta.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation EventFilterStatusMutation($tenantId: ID!, $input: UpdateEventFilterInput!) {
 tenantMutations(tenantId: $tenantId) {
   updateEventFilter(input: $input) {
     updatedFilter {
       id
       eventName
       pixelId
       filterState
     }
   }
 }
}
_________________________________________________________________________________________________________    
tenantId: ID!
_____________________________________________________________________________________________________________
      
input UpdateEventFilterInput {
  eventName: String!
  pixelIds: [String!]
  filterState: EventFilterState!
}            
     

Kolom

KolomDeskripsi

tenantId
ID

Wajib
Pengidentifikasi unik akun


UpdateEventFilterInput

KolomDeskripsi

eventName
String

Wajib

Nama peristiwa yang akan difilter

pixelIds
String

Opsional

Daftar ID Pixel yang perlu difilter. Jika dimasukkan null, semua Pixel untuk akun itu akan diperbarui

filterState
EventFilterState

Wajib

Keadaan filter


Memberikan

UpdateEventFilterResult

KolomDeskripsi

updatedFilter
EventFilter

Filter Peristiwa yang Diperbarui


Kode Kesalahan

KodeDeskripsi

401

Tidak berwenang memperbarui filter peristiwa

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation EventFilterStatusMutation($tenantId: ID!, $input: UpdateEventFilterInput!) {
tenantMutations(tenantId: $tenantId) {
  updateEventFilter(input: $input) {
    updatedFilter {
      eventName
      pixelId
      filterState
    }
  }
}
}
     

Variabel

{
"tenantId": "IaoreXfj",
"input": {
  "eventName": "AddToCart",
  "pixelIds": ["18904456377094531"],
  "filterState": "PUBLISH"
}
}
     

Contoh Tanggapan

{
   "data": {
       "tenantMutations": {
           "updateEventFilter": {
               "updatedFilter": {
                   "eventName": "AddToCart",
                   "pixelId": "18904456377094531",
                   "filterState": "PUBLISH"
               }
           }
       }
   }
}
     

Memblokir/Membuka Blokir Situs Web yang Diizinkan untuk Menerima dan Menerbitkan Peristiwa

Memblokir penerimaan peristiwa dari situs web tertentu.

Skema

POST https://{capig_domain}/capig/graphql/ 
_________________________________________________________________________________________________________________
      
mutation useComitDomainFilterChangeMutation($tenantId: ID!, $input: UpdateDomainFilterInput!) {
  tenantMutations(tenantId: $tenantId) {
    updateDomainFilter(input: $input) {
      updatedFilter {
        id
        domain
        pixelId
        filterState
      }
    }
  }
}
_________________________________________________________________________________________________________    
tenantId: ID!
_____________________________________________________________________________________________________________
      
input UpdateDomainFilterInput {
  domain: String!
  pixelIds: [String!]
  filterState: DomainFilterState!
}            
     

Kolom

KolomDeskripsi

tenantId
ID

Wajib
Pengidentifikasi unik akun


UpdateDomainFilterInput

KolomDeskripsi

domain
String

Wajib

Nama domain yang akan difilter


Format harus: example.com

pixelIds
String

Opsional

Daftar ID Pixel yang perlu difilter

filterState
DomainFilterState

Wajib

Keadaan filter


Memberikan

UpdateDomainFilterResult

KolomDeskripsi

updatedFilter
DomainFilter

Objek filter domain


Kode Kesalahan

KodeDeskripsi

401

Tidak berwenang memperbarui filter domain

500

Kesalahan server internal


Contoh Permintaan

Mutasi

mutation useComitDomainFilterChangeMutation($tenantId: ID!, $input: UpdateDomainFilterInput!) {
 tenantMutations(tenantId: $tenantId) {
   updateDomainFilter(input: $input) {
     updatedFilter {
       id
       domain
       pixelId
       filterState
     }
   }
 }
}
     

Variabel

{
 "tenantId": "IaoreXfj",
 "input": {
   "domain": "example.com",
   "filterState": "DROP"
 }
}
     

Contoh Tanggapan

"data": {
       "tenantMutations": {
           "updateDomainFilter": {
               "updatedFilter": {
                   "id": "DomainFilter:example.com:global",
                   "domain": "example.com",
                   "pixelId": null,
                   "filterState": "DROP"
               }
           }
       }
   }