Back to top

Print Campaign

Overview

Resource Group

Get Print campaigns of brand

Get Print campaigns of brand
GET/brands/:brand/print-campaigns

brand (uuid) ID of the brand

user (uuid) ID of the user (optional)

mediums (Email’ | ‘Social’ | ‘CrmOpenHouse’ | ‘FacebookCover’ | ‘InstagramStory’ | ‘LinkedInCover’ | ‘Letter’ | ‘Website’ | ‘RealtorCover’ | ‘YouTubeCover’ | ‘TwitterCover’ | ‘BusinessCard’ | ‘PostCard’ | ‘FoldedPostCard’ | ‘Brochure’ | ‘FoldedBrochure’ | ‘Newsletter’ | ‘Legal’ | ‘Flyer’ | 'IndexCard)[] array of medium

start (number) number of rows to skip before starting to return rows

limit (number) limited number of records order (string) eg: +created_at

Example URI

GET /brands/:brand/print-campaigns
URI Parameters
HideShow
brand
string (required) Example: caddc166-fc76-47d7-b01c-c3cd58cf1fb5
mediums
string (required) Example: Social
associations
string (required) Example: print_campaign.template_instance
order
string (required) Example: -created_at
Response  200
HideShow
Body
{
  "code": "OK",
  "data": [
    {
      "id": "85b42916-2e63-4d05-acda-fecea0da16a2",
      "brand": "caddc166-fc76-47d7-b01c-c3cd58cf1fb5",
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "template_instance": {
        "id": "22c9b384-2a07-4061-90da-8fe0348fbacc",
        "created_at": 1765163618.36321,
        "html": "<div>fakeTemplateInstance</div>",
        "file": {
          "id": "4a1817db-ad91-4e00-b9d6-c2ab781e4187",
          "created_at": 1765163618.889972,
          "updated_at": 1765163618.889972,
          "deleted_at": null,
          "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
          "path": "templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
          "name": "image.png",
          "public": true,
          "type": "file",
          "url": "https://test.cloudfront.net/templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
          "preview_url": "https://test.cloudfront.net/templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
          "mime": "image/png"
        },
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "branch": "http://mock-branch-url",
        "updated_at": 1765163618.36321,
        "deleted_at": null,
        "type": "template_instance"
      },
      "type": "print_campaign",
      "created_at": 1765163618.967951,
      "updated_at": 1765163618.967954,
      "deleted_at": null
    }
  ],
  "info": {
    "count": 1,
    "total": 1
  }
}

Create a print campaign

Create a print campaign
POST/brands/:brand/print-campaigns

Example URI

POST /brands/:brand/print-campaigns
URI Parameters
HideShow
brand
string (required) Example: caddc166-fc76-47d7-b01c-c3cd58cf1fb5
associations
string (required) Example: print_campaign.template_instance
Request
HideShow
Body
{
  "templateInstance": "22c9b384-2a07-4061-90da-8fe0348fbacc"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "85b42916-2e63-4d05-acda-fecea0da16a2",
    "brand": "caddc166-fc76-47d7-b01c-c3cd58cf1fb5",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "template_instance": {
      "id": "22c9b384-2a07-4061-90da-8fe0348fbacc",
      "created_at": 1765163618.36321,
      "html": "<div>fakeTemplateInstance</div>",
      "file": {
        "id": "4a1817db-ad91-4e00-b9d6-c2ab781e4187",
        "created_at": 1765163618.889972,
        "updated_at": 1765163618.889972,
        "deleted_at": null,
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "path": "templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "name": "image.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "preview_url": "https://test.cloudfront.net/templates/instances/e43f5c80-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "mime": "image/png"
      },
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "branch": "http://mock-branch-url",
      "updated_at": 1765163618.36321,
      "deleted_at": null,
      "type": "template_instance"
    },
    "type": "print_campaign",
    "created_at": 1765163618.967951,
    "updated_at": 1765163618.967954,
    "deleted_at": null
  }
}

update a print campaign

update a print campaign
PUT/brands/:brand/print-campaigns/:id

Example URI

PUT /brands/:brand/print-campaigns/:id
URI Parameters
HideShow
associations
string (required) Example: print_campaign.template_instance
brand
string (required) Example: caddc166-fc76-47d7-b01c-c3cd58cf1fb5
id
string (required) Example: 85b42916-2e63-4d05-acda-fecea0da16a2
Request
HideShow
Body
{
  "templateInstance": "82d02a0b-d4ec-4fd9-986e-f70199cebbf4"
}
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "85b42916-2e63-4d05-acda-fecea0da16a2",
    "brand": "caddc166-fc76-47d7-b01c-c3cd58cf1fb5",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "template_instance": {
      "id": "82d02a0b-d4ec-4fd9-986e-f70199cebbf4",
      "created_at": 1765163618.36321,
      "html": "<div>fake2TemplateInstance</div>",
      "file": {
        "id": "e219af11-ecef-46fe-99b5-9769f6c3d9a7",
        "created_at": 1765163619.094239,
        "updated_at": 1765163619.094239,
        "deleted_at": null,
        "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
        "path": "templates/instances/e45e5630-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "name": "image.png",
        "public": true,
        "type": "file",
        "url": "https://test.cloudfront.net/templates/instances/e45e5630-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "preview_url": "https://test.cloudfront.net/templates/instances/e45e5630-d3e3-11f0-a2d4-1bcac3894d4e.png",
        "mime": "image/png"
      },
      "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
      "branch": "http://mock-branch-url",
      "updated_at": 1765163618.36321,
      "deleted_at": null,
      "type": "template_instance"
    },
    "type": "print_campaign",
    "created_at": 1765163618.967951,
    "updated_at": 1765163619.181574,
    "deleted_at": null
  }
}
Response  204

get single print campaign

get single print campaign
GET/brands/:brand/print-campaigns/stats

brand (uuid) ID of the brand user (uuid) ID of the user (optional)

Example URI

GET /brands/:brand/print-campaigns/stats
URI Parameters
HideShow
brand
string (required) Example: caddc166-fc76-47d7-b01c-c3cd58cf1fb5
Response  200
HideShow
Body
{
  "type": "print_campaign_stats",
  "Social": "1"
}

get single print campaign

get single print campaign
GET/brands/:brand/print-campaigns/:id

Example URI

GET /brands/:brand/print-campaigns/:id
URI Parameters
HideShow
brand
string (required) Example: caddc166-fc76-47d7-b01c-c3cd58cf1fb5
id
string (required) Example: 85b42916-2e63-4d05-acda-fecea0da16a2
Response  200
HideShow
Body
{
  "code": "OK",
  "data": {
    "id": "85b42916-2e63-4d05-acda-fecea0da16a2",
    "brand": "caddc166-fc76-47d7-b01c-c3cd58cf1fb5",
    "created_by": "80a227b2-29a0-11e7-b636-e4a7a08e15d4",
    "type": "print_campaign",
    "created_at": 1765163618.967951,
    "updated_at": 1765163619.181574,
    "deleted_at": null
  }
}

Generated by aglio on 08 Dec 2025