Ir al contenido principal

Audience

Midway | Customer Support avatar
Escrito por Midway | Customer Support
Actualizado hace más de 4 meses

This page provides you with information on how to manage your audience.

Index:

  • Read and search audience

  • Create and update audience

  • Delete audience

Read and search audience

Use the following endpoint to search and read the audience we have in the system.

Description

Read and search audience

HTTP Method

GET

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

60 per minute

JSON request (example)

none

JSON response (example)

Paging and filtering (example)

The paging and filters can be combined.

Filtering:

# Search by email https://api.midway.la/api/consumer/[email protected]
# Search by phone https://api.midway.la/api/consumer/audience?phone=+54911xxxxxxxx

Paging:

https://api.midway.la/api/consumer/[email protected]&page=2&per_page=250

Create and update audience

Use the following endpoint to create and update the audience of your company in our system, we use the parameter “email” to create or updated the profiles. You can send many profiles in one request.

Descripción

Create and update audience.

HTTP Method

POST

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

60 requests per minute

Max records

5000 per request

Reference

See the ProfilesDTO table below.

JSON request (example)

JSON response (example)

status code 204

Paging and filtering (example)

none

Delete audience

Use the following endpoint to delete the profiles of your company in our system, we use the parameter “email” to delete. You can send many profiles in one request to delete.

Descripción

Delete audience.

HTTP Method

DELETE

URL

Headers

X-Tenant:

Authorization: Bearer

Rate limit

30 requests per minute

JSON request (example)

JSON response (example)

status code 204

Paging and filtering (example)

none

The parameters that have “*” are required.

ProfilesDTO

Parameter

Type

Description

source*

string

The source is from which application the information comes from (vtex, prestashop, system,crm, etc).

profiles*

List <ProfileDTO>

The profiles field is the list of profiles to be uploaded in bulk.

ProfileDTO

Parameter

Type

Description

email*

string

The email field is the email of the profile.

firstname

string

The firstname field is the firstname of the profile.

lastname

string

The lastname field is the lastname of the profile.

birthdate

string

The birthdate field is the birthdate of the profile (Y-m-d eg 1992-12-22).

gender

string

The gender field is the gender of the profile male, female or neutral.

phone

string

The phone field is the phone of the profile, the phone need to have the international format.

city

string

The city field is the city of the profile.

province

string

The province field is the province of the profile.

country

string

The country field is the country of the profile.

postal_code

string

The postal_code field is the postal_code of the profile.

address

string

The address field is the address of the profile.

created_at*

string

The date relate to the creation of the profile in UTC (Y-m-d H:i:s eg 2024-10-01 09:00:00).

updated_at*

string

The date relate to the last updated of the profile in UTC (Y-m-d H:i:s eg 2024-10-01 15:00:00).

<Dynamic field>

<Dynamic field example>

The dynamic field is used to load the custom data you need, but first you have to create the dynamic field through the web application.

Dynamic field example

Parameter

Type

Description

<Dynamic field>

E.g.

motherName

<Dynamic field type>

E.g.

Lois

You must send the name of the dynamic field you created in the web application and the value must be the type of value you set up in the web application.

If the client does not have a value for that dynamic field, you can ignore the field for that client or send us NULL.

You can send as many dynamic fields as you need.

¿Ha quedado contestada tu pregunta?