Print Campaign
Overview
Resource Group ¶
Get Print campaigns of brand ¶
Get Print campaigns of brandGET/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
- brand
string(required) Example: b93c0f3e-fc7a-4570-ac5b-aeb137f96708- mediums
string(required) Example: Social- associations
string(required) Example: print_campaign.template_instance- order
string(required) Example: -created_at
Response
200Body
{
"code": "OK",
"data": [
{
"id": "80904526-a05a-44f7-8700-76bdf1e127b9",
"brand": "b93c0f3e-fc7a-4570-ac5b-aeb137f96708",
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"template_instance": {
"id": "870835cc-a7e2-4675-862e-085baf1b059a",
"created_at": 1783014949.817754,
"html": "<div>fakeTemplateInstance</div>",
"file": {
"id": "76228cba-f3b7-4613-8ac6-63d0a171f4f3",
"created_at": 1783014950.333446,
"updated_at": 1783014950.333446,
"deleted_at": null,
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"path": "templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"name": "image.png",
"public": true,
"type": "file",
"url": "https://test.cloudfront.net/templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"preview_url": "https://test.cloudfront.net/templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"mime": "image/png"
},
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"branch": "http://mock-branch-url",
"updated_at": 1783014949.817754,
"deleted_at": null,
"type": "template_instance"
},
"type": "print_campaign",
"created_at": 1783014950.397076,
"updated_at": 1783014950.397076,
"deleted_at": null
}
],
"info": {
"count": 1,
"total": 1
}
}Create a print campaign ¶
Create a print campaignPOST/brands/:brand/print-campaigns
Example URI
POST /brands/:brand/print-campaigns
URI Parameters
- brand
string(required) Example: b93c0f3e-fc7a-4570-ac5b-aeb137f96708- associations
string(required) Example: print_campaign.template_instance
Request
Body
{
"templateInstance": "870835cc-a7e2-4675-862e-085baf1b059a"
}Response
200Body
{
"code": "OK",
"data": {
"id": "80904526-a05a-44f7-8700-76bdf1e127b9",
"brand": "b93c0f3e-fc7a-4570-ac5b-aeb137f96708",
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"template_instance": {
"id": "870835cc-a7e2-4675-862e-085baf1b059a",
"created_at": 1783014949.817754,
"html": "<div>fakeTemplateInstance</div>",
"file": {
"id": "76228cba-f3b7-4613-8ac6-63d0a171f4f3",
"created_at": 1783014950.333446,
"updated_at": 1783014950.333446,
"deleted_at": null,
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"path": "templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"name": "image.png",
"public": true,
"type": "file",
"url": "https://test.cloudfront.net/templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"preview_url": "https://test.cloudfront.net/templates/instances/42f118b0-763f-11f1-94b5-7519f45a456b.png",
"mime": "image/png"
},
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"branch": "http://mock-branch-url",
"updated_at": 1783014949.817754,
"deleted_at": null,
"type": "template_instance"
},
"type": "print_campaign",
"created_at": 1783014950.397076,
"updated_at": 1783014950.397076,
"deleted_at": null
}
}update a print campaign ¶
update a print campaignPUT/brands/:brand/print-campaigns/:id
Example URI
PUT /brands/:brand/print-campaigns/:id
URI Parameters
- associations
string(required) Example: print_campaign.template_instance- brand
string(required) Example: b93c0f3e-fc7a-4570-ac5b-aeb137f96708- id
string(required) Example: 80904526-a05a-44f7-8700-76bdf1e127b9
Request
Body
{
"templateInstance": "3282a0a9-60c2-4f98-9c6b-fe3394542107"
}Response
200Body
{
"code": "OK",
"data": {
"id": "80904526-a05a-44f7-8700-76bdf1e127b9",
"brand": "b93c0f3e-fc7a-4570-ac5b-aeb137f96708",
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"template_instance": {
"id": "3282a0a9-60c2-4f98-9c6b-fe3394542107",
"created_at": 1783014949.817754,
"html": "<div>fake2TemplateInstance</div>",
"file": {
"id": "d573d4c4-ae9d-4b12-8641-351857bd035d",
"created_at": 1783014950.498496,
"updated_at": 1783014950.498496,
"deleted_at": null,
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"path": "templates/instances/430a6d10-763f-11f1-94b5-7519f45a456b.png",
"name": "image.png",
"public": true,
"type": "file",
"url": "https://test.cloudfront.net/templates/instances/430a6d10-763f-11f1-94b5-7519f45a456b.png",
"preview_url": "https://test.cloudfront.net/templates/instances/430a6d10-763f-11f1-94b5-7519f45a456b.png",
"mime": "image/png"
},
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"branch": "http://mock-branch-url",
"updated_at": 1783014949.817754,
"deleted_at": null,
"type": "template_instance"
},
"type": "print_campaign",
"created_at": 1783014950.397076,
"updated_at": 1783014950.561811,
"deleted_at": null
}
}Response
204get single print campaign ¶
get single print campaignGET/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
- brand
string(required) Example: b93c0f3e-fc7a-4570-ac5b-aeb137f96708
Response
200Body
{
"type": "print_campaign_stats",
"Social": "1"
}get single print campaign ¶
get single print campaignGET/brands/:brand/print-campaigns/:id
Example URI
GET /brands/:brand/print-campaigns/:id
URI Parameters
- brand
string(required) Example: b93c0f3e-fc7a-4570-ac5b-aeb137f96708- id
string(required) Example: 80904526-a05a-44f7-8700-76bdf1e127b9
Response
200Body
{
"code": "OK",
"data": {
"id": "80904526-a05a-44f7-8700-76bdf1e127b9",
"brand": "b93c0f3e-fc7a-4570-ac5b-aeb137f96708",
"created_by": "f8978845-12f3-428f-bdd5-905dc32c41b2",
"type": "print_campaign",
"created_at": 1783014950.397076,
"updated_at": 1783014950.561811,
"deleted_at": null
}
}