---
title: "Platform kreator Douyin (Xingtu) Metrik Pemasaran API (V1)"
description: "Mengembalikan informasi pemasaran dari Douyin Creator Marketplace (Xingtu) untuk creator dan saluran konten tertentu. Digunakan untuk membandingkan penawaran komersial creator selama perencanaan kampanye."
lastUpdated: false
aiUsagePrompt: true
---

# Platform kreator Douyin \(Xingtu\) Metrik Pemasaran API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1\"")'
  :summary='JSON.parse("\"Metrik Pemasaran (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/douyin-creator-marketplace-xingtu/marketing-metrics-v1-id.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Token autentikasi pengguna.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"oAuthorId\",\"in\":\"query\",\"description\":\"ID unik penulis.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"platform\",\"in\":\"query\",\"description\":\"Jenis platform.\\n\\nNilai yang tersedia:\\n- `SHORT_VIDEO`: Video pendek\\n- `LIVE_STREAMING`: Streaming langsung\\n- `PICTURE_TEXT`: Gambar dan teks\\n- `SHORT_DRAMA`: Drama pendek\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"SHORT_VIDEO\",\"description\":\"Jenis platform\",\"enum\":[\"SHORT_VIDEO\",\"LIVE_STREAMING\",\"PICTURE_TEXT\",\"SHORT_DRAMA\"]}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Informasi pemasaran pembuat untuk saluran yang dipilih. Tawaran, kegiatan, atau peringkat mungkin tidak tersedia.\",\"properties\":{\"price_info\":{\"type\":\"array\",\"description\":\"Tawaran kolaborasi yang dikembalikan untuk pembuat dan saluran ini. Daftar bisa kosong.\",\"items\":{\"type\":\"object\",\"description\":\"Tawaran kolaborasi. Tawaran bisa ditampilkan tanpa jumlah atau batas waktu.\",\"properties\":{\"desc\":{\"type\":\"string\",\"description\":\"Nama tampilan tawaran kolaborasi.\"},\"author_id\":{\"type\":\"string\",\"description\":\"ID pembuat Xingtu untuk tawaran, dikembalikan sebagai teks. Ini sesuai dengan `oAuthorId`.\"},\"price\":{\"type\":\"integer\",\"description\":\"Jumlah yang dikutip, jika tersedia. Respons tidak menyebutkan mata uang atau skala.\"},\"origin_price\":{\"type\":\"integer\",\"description\":\"Jumlah asli yang terkait dengan tawaran, jika tersedia. Respons tidak menyebutkan mata uang atau skala.\"},\"has_discount\":{\"type\":\"boolean\",\"description\":\"Apakah tawaran ditandai sebagai diskon.\"},\"settlement_desc\":{\"type\":\"string\",\"description\":\"Teks tampilan untuk metode pembayaran, seperti harga tetap.\"},\"settlement_type\":{\"type\":\"integer\",\"description\":\"Kode metode pembayaran. Respons tidak termasuk definisi kode.\"},\"need_price\":{\"type\":\"boolean\",\"description\":\"Apakah opsi kolaborasi ditandai sebagai memerlukan penawaran.\"},\"enable\":{\"type\":\"boolean\",\"description\":\"Apakah tawaran ditandai sebagai aktif.\"},\"is_open\":{\"type\":\"boolean\",\"description\":\"Apakah opsi kolaborasi ditandai sebagai terbuka.\"},\"online_status\":{\"type\":\"integer\",\"description\":\"Kode status online untuk tawaran. Respons tidak termasuk definisi kode.\"},\"start_time\":{\"type\":\"string\",\"description\":\"Awal batas waktu tawaran dalam detik Unix, dikembalikan sebagai teks jika tersedia.\"},\"end_time\":{\"type\":\"string\",\"description\":\"Akhir batas waktu tawaran dalam detik Unix, dikembalikan sebagai teks jika tersedia.\"},\"task_category\":{\"type\":\"integer\",\"description\":\"Kode kategori tugas untuk opsi kolaborasi. Respons tidak termasuk definisi kode.\"},\"task_category_status\":{\"type\":\"integer\",\"description\":\"Kode status kategori tugas. Respons tidak termasuk definisi kode.\"},\"video_type\":{\"type\":\"integer\",\"description\":\"Kode jenis video untuk opsi kolaborasi. Respons tidak termasuk definisi kode.\"},\"price_extra_info\":{\"type\":\"object\",\"description\":\"Detail harga tambahan, jika dikembalikan. Field rasio mungkin tidak ada.\",\"properties\":{\"price_ratio\":{\"type\":\"string\",\"description\":\"Rasio penjualan diberikan dalam bentuk teks. Respons tidak menyebutkan skala atau aturan perhitungannya.\"},\"videotype_for_price_ratio\":{\"type\":\"string\",\"description\":\"Jenis video yang terkait dengan rasio penjualan, diberikan dalam bentuk teks.\"}}},\"activity_info\":{\"type\":\"array\",\"description\":\"Aktivitas yang terkait dengan penawaran. Array ini bisa kosong.\"},\"template_list\":{\"type\":\"array\",\"description\":\"Template yang terkait dengan opsi kolaborasi. Array ini bisa kosong.\"}}}},\"industry_tags\":{\"type\":\"array\",\"description\":\"Label industri yang diberikan untuk pembuat konten.\",\"items\":{\"type\":\"string\"}},\"hot_list_ranks\":{\"type\":\"array\",\"description\":\"Peringkat hot-list untuk pembuat konten. Daftar ini bisa kosong.\",\"items\":{\"type\":\"object\",\"description\":\"Entri peringkat hot-list untuk pembuat konten.\",\"properties\":{\"hot_list_name\":{\"type\":\"string\",\"description\":\"Nama hot list.\"},\"industry_id\":{\"type\":\"string\",\"description\":\"Identifikasi industri yang terkait dengan peringkat, diberikan dalam bentuk teks.\"},\"industry_name\":{\"type\":\"string\",\"description\":\"Nama industri yang terkait dengan peringkat.\"},\"period\":{\"type\":\"string\",\"description\":\"Periode peringkat yang diberikan oleh daftar, dalam bentuk teks.\"},\"rank_level\":{\"type\":\"string\",\"description\":\"Tingkat peringkat yang ditampilkan untuk pembuat konten, diberikan dalam bentuk teks.\"},\"rank_type\":{\"type\":\"string\",\"description\":\"Jenis peringkat yang diberikan dalam bentuk teks.\"},\"tag\":{\"type\":\"string\",\"description\":\"Teks tag yang terkait dengan entri peringkat.\"},\"type\":{\"type\":\"integer\",\"description\":\"Kode jenis entri hot-list. Respons tidak termasuk definisi kode tersebut.\"}}}},\"activity_info\":{\"type\":\"array\",\"description\":\"Aktivitas pemasaran yang diberikan untuk pembuat konten. Array ini bisa kosong.\"},\"base_resp\":{\"type\":\"object\",\"description\":\"Detail status yang diberikan bersama dengan informasi pemasaran.\",\"properties\":{\"status_code\":{\"type\":\"integer\",\"description\":\"Kode status pencarian pemasaran. Nilai nol menunjukkan keberhasilan.\"},\"status_message\":{\"type\":\"string\",\"description\":\"Pesan status pencarian pemasaran.\"}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Parameter atau isi permintaan yang tidak valid\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Token akses yang tidak valid atau tidak aktif\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Izin ditolak\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Laju permintaan atau batas kuota harian terlampaui\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Kesalahan server internal\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Layanan sementara tidak tersedia\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"API produksi global (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1\"")' />

<p>Mengembalikan informasi pemasaran dari Douyin Creator Marketplace (Xingtu) untuk creator dan saluran konten tertentu. Digunakan untuk membandingkan penawaran komersial creator selama perencanaan kampanye.</p>

## Parameter

<div class="api-doc-table api-doc-table--params">

| Nama | Lokasi | Jenis | Wajib | Bawaan | Deskripsi |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Ya | - | Token autentikasi pengguna. |
| <code>oAuthorId</code> | query | <code>string</code> | Ya | - | ID unik penulis. |
| <code>platform</code> | query | <code>string</code> | Tidak | <code>SHORT_VIDEO</code> | Jenis platform.<br /><br><br>Nilai yang tersedia:<br /><br>- <code>SHORT_VIDEO</code>: Video pendek<br /><br>- <code>LIVE_STREAMING</code>: Streaming langsung<br /><br>- <code>PICTURE_TEXT</code>: Gambar dan teks<br /><br>- <code>SHORT_DRAMA</code>: Drama pendek |

</div>

## Contoh Kode

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE'
```

```text [🤖 Prompt AI]
Saya ingin menggunakan API "Metrik Pemasaran (V1)" dari JustOneAPI.
URL dasar: https://api.justoneapi.com.
Jalur API: /api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE
Endpoint API: BASE_URL + /api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE
Metode HTTP: GET
Autentikasi: Tambahkan parameter query "token" ke URL.
Definisi OpenAPI: https://docs.justoneapi.com/openapi/douyin-creator-marketplace-xingtu/marketing-metrics-v1-id.json

Parameter:
- token (query): Token autentikasi pengguna. (Wajib)
- oAuthorId (query): ID unik penulis. (Wajib)
- platform (query): Jenis platform.

Nilai yang tersedia:
- `SHORT_VIDEO`: Video pendek
- `LIVE_STREAMING`: Streaming langsung
- `PICTURE_TEXT`: Gambar dan teks
- `SHORT_DRAMA`: Drama pendek

Format Kembalian: tangani dengan aman JSON atau teks sesuai dengan Content-Type yang sebenarnya.

Penanganan respons dan kode kesalahan:
1. Tentukan hasil pemrosesan dari kolom "code" dalam isi respons (code 0 berarti berhasil).
2. Batas waktu yang disarankan: Atur batas waktu permintaan menjadi 120 detik. Jika 120 detik terlalu lama untuk kebutuhan Anda, gunakan setidaknya 60 detik. Sebagian kecil permintaan mungkin mencapai batas waktu sebelum hasil diterima.
3. Kode hasil:
   - 0: Berhasil
   - 100: Token tidak valid atau tidak aktif
   - 301: Gagal mengambil data. Silakan coba lagi.
   - 302: Batas frekuensi permintaan terlampaui
   - 303: Kuota harian terlampaui
   - 400: Parameter tidak valid
   - 500: Kesalahan internal server
   - 600: Akses ditolak
   - 601: Saldo tidak mencukupi
   - 602: Batas anggaran token tercapai
4. Kode 601 berarti saldo bersama akun tidak mencukupi. Kode 602 berarti token API yang digunakan telah mencapai batas anggaran kumulatifnya sendiri. Menetapkan batas anggaran token tidak memindahkan dana dari saldo bersama akun.

Tolong bantu saya menulis skrip dalam bahasa pemrograman favorit saya untuk memanggil API ini dan menangani responsnya.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Diberikan oleh server OpenAPI

url = BASE_URL + "/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Diberikan oleh server OpenAPI
const url = BASE_URL + "/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Diberikan oleh server OpenAPI
        final String url = BASE_URL + "/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Diberikan oleh server OpenAPI

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Diberikan oleh server OpenAPI
$url = $BASE_URL . '/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1?token=YOUR_API_KEY&oAuthorId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/douyin-creator-marketplace-xingtu/marketing-metrics-v1-id.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[Definisi OpenAPI (JSON)]</a>
</div>

## Field Respons

Field Kunci dalam respons yang sukses (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Jalur Field | Jenis | Deskripsi |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Informasi pemasaran pembuat untuk saluran yang dipilih. Tawaran, kegiatan, atau peringkat mungkin tidak tersedia. |
| <code>data.price_info</code> | <code>array</code> | Tawaran kolaborasi yang dikembalikan untuk pembuat dan saluran ini. Daftar bisa kosong. |
| <code>data.price_info[]</code> | <code>object</code> | Tawaran kolaborasi. Tawaran bisa ditampilkan tanpa jumlah atau batas waktu. |
| <code>data.price_info[].desc</code> | <code>string</code> | Nama tampilan tawaran kolaborasi. |
| <code>data.price_info[].author_id</code> | <code>string</code> | ID pembuat Xingtu untuk tawaran, dikembalikan sebagai teks. Ini sesuai dengan <code>oAuthorId</code>. |
| <code>data.price_info[].price</code> | <code>integer</code> | Jumlah yang dikutip, jika tersedia. Respons tidak menyebutkan mata uang atau skala. |
| <code>data.price_info[].origin_price</code> | <code>integer</code> | Jumlah asli yang terkait dengan tawaran, jika tersedia. Respons tidak menyebutkan mata uang atau skala. |
| <code>data.price_info[].has_discount</code> | <code>boolean</code> | Apakah tawaran ditandai sebagai diskon. |
| <code>data.price_info[].settlement_desc</code> | <code>string</code> | Teks tampilan untuk metode pembayaran, seperti harga tetap. |
| <code>data.price_info[].settlement_type</code> | <code>integer</code> | Kode metode pembayaran. Respons tidak termasuk definisi kode. |
| <code>data.price_info[].need_price</code> | <code>boolean</code> | Apakah opsi kolaborasi ditandai sebagai memerlukan penawaran. |
| <code>data.price_info[].enable</code> | <code>boolean</code> | Apakah tawaran ditandai sebagai aktif. |
| <code>data.price_info[].is_open</code> | <code>boolean</code> | Apakah opsi kolaborasi ditandai sebagai terbuka. |
| <code>data.price_info[].online_status</code> | <code>integer</code> | Kode status online untuk tawaran. Respons tidak termasuk definisi kode. |
| <code>data.price_info[].start_time</code> | <code>string</code> | Awal batas waktu tawaran dalam detik Unix, dikembalikan sebagai teks jika tersedia. |
| <code>data.price_info[].end_time</code> | <code>string</code> | Akhir batas waktu tawaran dalam detik Unix, dikembalikan sebagai teks jika tersedia. |
| <code>data.price_info[].task_category</code> | <code>integer</code> | Kode kategori tugas untuk opsi kolaborasi. Respons tidak termasuk definisi kode. |
| <code>data.price_info[].task_category_status</code> | <code>integer</code> | Kode status kategori tugas. Respons tidak termasuk definisi kode. |
| <code>data.price_info[].video_type</code> | <code>integer</code> | Kode jenis video untuk opsi kolaborasi. Respons tidak termasuk definisi kode. |
| <code>data.price_info[].price_extra_info</code> | <code>object</code> | Detail harga tambahan, jika dikembalikan. Field rasio mungkin tidak ada. |
| <code>data.price_info[].price_extra_info.price_ratio</code> | <code>string</code> | Rasio penjualan diberikan dalam bentuk teks. Respons tidak menyebutkan skala atau aturan perhitungannya. |
| <code>data.price_info[].price_extra_info.videotype_for_price_ratio</code> | <code>string</code> | Jenis video yang terkait dengan rasio penjualan, diberikan dalam bentuk teks. |
| <code>data.price_info[].activity_info</code> | <code>array</code> | Aktivitas yang terkait dengan penawaran. Array ini bisa kosong. |
| <code>data.price_info[].template_list</code> | <code>array</code> | Template yang terkait dengan opsi kolaborasi. Array ini bisa kosong. |
| <code>data.industry_tags</code> | <code>array</code> | Label industri yang diberikan untuk pembuat konten. |
| <code>data.industry_tags[]</code> | <code>string</code> | - |
| <code>data.hot_list_ranks</code> | <code>array</code> | Peringkat hot-list untuk pembuat konten. Daftar ini bisa kosong. |
| <code>data.hot_list_ranks[]</code> | <code>object</code> | Entri peringkat hot-list untuk pembuat konten. |
| <code>data.hot_list_ranks[].hot_list_name</code> | <code>string</code> | Nama hot list. |
| <code>data.hot_list_ranks[].industry_id</code> | <code>string</code> | Identifikasi industri yang terkait dengan peringkat, diberikan dalam bentuk teks. |
| <code>data.hot_list_ranks[].industry_name</code> | <code>string</code> | Nama industri yang terkait dengan peringkat. |
| <code>data.hot_list_ranks[].period</code> | <code>string</code> | Periode peringkat yang diberikan oleh daftar, dalam bentuk teks. |
| <code>data.hot_list_ranks[].rank_level</code> | <code>string</code> | Tingkat peringkat yang ditampilkan untuk pembuat konten, diberikan dalam bentuk teks. |
| <code>data.hot_list_ranks[].rank_type</code> | <code>string</code> | Jenis peringkat yang diberikan dalam bentuk teks. |
| <code>data.hot_list_ranks[].tag</code> | <code>string</code> | Teks tag yang terkait dengan entri peringkat. |
| <code>data.hot_list_ranks[].type</code> | <code>integer</code> | Kode jenis entri hot-list. Respons tidak termasuk definisi kode tersebut. |
| <code>data.activity_info</code> | <code>array</code> | Aktivitas pemasaran yang diberikan untuk pembuat konten. Array ini bisa kosong. |
| <code>data.base_resp</code> | <code>object</code> | Detail status yang diberikan bersama dengan informasi pemasaran. |
| <code>data.base_resp.status_code</code> | <code>integer</code> | Kode status pencarian pemasaran. Nilai nol menunjukkan keberhasilan. |
| <code>data.base_resp.status_message</code> | <code>string</code> | Pesan status pencarian pemasaran. |

</div>

## Contoh Respons

<ApiExampleSection :api='JSON.parse("\"/api/douyin-xingtu/gw/api/author/get_author_marketing_info/v1\"")' />

