Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
ExplorePublic APIManagement API
Users APIOperations APIMessaging APIReporting APIML APIData API
ExplorePublic APIManagement API
Users APIOperations APIMessaging APIReporting APIML APIData API
  1. Files
  • Introduction
  • Core
    • Privacy Policy
      • Introduction
      • Show Privacy Policy
      • Update Privacy Policy
    • Community
      • Community Model
      • Show Community
      • Update Community
    • Loyalty Clubs
      • Show Loyalty Club
      • Update Loyalty Club
    • Applications
      • Application model
      • List applications
      • Create application
      • Update application
      • Show application
      • Destroy application
    • Branding
      • Show loyalty club branding
      • Show application branding
      • Update application branding
      • Duplicate application branding
      • Destroy application branding
    • Cookie Policy
      • Show Cookie Policy
      • Update Cookie Policy
    • Terms
      • Introduction
      • Show Terms
      • Update Terms
    • Domains
      • Introduction
      • List Domains
      • Show Domain
      • Create Domain
      • Destroy Domain
    • Domain Email Configs
      • Introduction
      • Show Domain Email Config
      • Create Domain Email Config
      • Destroy Domain Email Config
    • Domain Web Configs
      • Introduction
      • Show Domain Web Config
      • Create Domain Web Config
      • Destroy Domain Web Config
    • TLS Certificates
      • Introduction
      • List TLS Certificates
      • Show TLS Certificate
      • Create TLS Certificate
      • Update TLS Certificate
      • Destroy TLS Certificate
    • Links
      • Introduction
      • List Links
      • Show Link
      • Enable Link
      • Disable Link
      • Create Link
      • Delete Link
      • Generate Link
    • Fonts
      • Introduction
      • List Fonts
      • Show Font
      • Create Font
      • Enable Font
      • Disable Font
      • Update Font
      • Destroy Font
    • Subunits
      • Introduction
      • List Subunits
      • Show Subunit By External ID
      • Show Subunit
      • Create Subunit
      • Update Subunit
      • Destroy Subunit
    • Subunits Scopes
      • Introduction
      • List Subunits Scopes
      • Show Subunits Scope
      • Create Subunits Scope
      • Update Subunits Scope
      • Destroy Subunits Scope
    • Contacts
      • Introduction
      • List Customer Contacts
      • Show Customer Contact
      • Create Customer Contact
      • Update Customer Contact
      • Destroy Customer Contact
      • List Organization Contacts
      • Show Organization Contact
      • Create Organization Contact
      • Update Organization Contact
      • Destroy Organization Contact
    • Translations
      • [DRAFT] Show Loyalty Club Translations
    • Promotions Policy
      • Introduction
      • Show Promotions Policy
      • Update Promotions Policy
    • Tracker
      • Show Loyalty Club Configuration
      • Update Loyalty Club Configuration
      • List tracked links
      • Show tracked link
    • Social Logins
      • List configurations
      • Show configuration
      • Create configuration
      • Update configuration
      • Destroy configuration
    • Billing
      • Service Quotas
        • ServiceQuotasConfig Model
        • List Service quotas configs
        • Create Service quotas config
        • Show Service quotas config
        • Update Service quotas config
        • Delete Service quotas config
      • Recurring Charges
        • RecurringCharge Model
        • Archieve Recurring charge
        • Restore Recurring charge
        • List Recurring charges
        • Create Recurring charge
        • Show Recurring charge
        • Update Recurring charge
        • Delete Recurring charge
      • Service Usages
        • History
          • Show Service Usage History
        • List Service Usages
      • Customer Accoutning Configurations
        • Show customer accoutning configuration
        • Update customer accoutning configuration
      • Show billing summary
      • Show billing breakdown
      • Show billing balance
      • Show billing manual balance changes
      • Add billing manual balance changes Copy
    • SMS Sender Identities
      • Introduction
      • List Sms Sender Identities
    • Member Authentication Configuration
      • Show loyalty club member authentication configuration
      • Show application member authentication configuration
      • Update member authentication configuration
      • Duplicate application member authentication configuration
      • Destroy member authentication configuration
    • Sender Identities
      • SMS Sender Identities
        • Introduction
        • List SMS Sender Identity
        • Show SMS Sender Identity
        • Create SMS Sender Identity
        • Update SMS Sender Identity
        • Delete SMS Sender Identity
      • Email Sender Identities
        • Introduction
        • List Email Sender Identities
        • Show Email Sender Identity
        • Create Email Sender Identity
        • Update Email Sender Identity
        • Delete Email Sender Identity
  • Members
    • Listing Members
      • List Members
      • List Members By Audience
    • Member Profile
      • Public Info
        • Show Member Public Info
        • Show Member Public Info by MSISDN
        • Show Member Public Info by Email
      • Person ID
        • Show Member Person ID
        • Show Member Person ID by MSISDN
        • Show Member Person ID by Email
      • Cars
        • Introduction
        • List Member Cars
        • Create Member Car
        • Show Member Car
        • Find Member Car By LPN
        • Find Member Car By Hashed LPN
        • Update Member Car
        • Renew Member Car
        • Destroy Member Car
        • Lookup a Car
      • Children
        • MemberChild Model
        • List Member Children
        • Register Member Child
        • Show Member Child
        • Update Member Child
        • Unregister Member Child
      • Groups
        • Add Member to Group
        • Remove Member from a Group
        • List Members of a Group
        • List Groups of a Member By MSISDN
        • List Groups of a Member by Email
        • List Groups of a Member
        • Add Members to Group
        • Remove Members from Group
      • Programs
        • By Member Token
          • List Member Programs
          • Update Member Programs
          • Add Member to Program
          • Remove Member from Program
        • List Member Programs
        • Update Member Programs
        • Add Member to Program
        • Remove Member from Program
      • Benefits
        • Introduction
        • List Member Benefits
        • Show Member Benefit
        • Show Member Parking Benefit By Car LPN
        • Show Member Parking Benefit By Hashed Car LPN
      • Offers
        • Show Offers Meta
        • Show Offer
        • Encode Offer
        • List Offers
        • Use Offer
        • Like Offer
        • Unlike Offer
        • Grant Offer
      • Rewards
        • Show Member Rewards Status
        • Grant Points
        • Cancel Transaction
      • Export
        • Export Member
        • Download Member Export
      • Misc
        • Show Member Messages History
        • Show Member Profile History
        • Generate Link
      • Create Member
      • Update Member
      • Validate Member
      • Register Member App Token
      • Show Member
      • Show Member By MSISDN
      • Show Member By Email
      • Show Member By Encrypted ID
      • Show Member By User ID
      • Destroy Member
    • Imports
      • Introduction
      • Create Members Import Request
      • Show Members Import Status
      • Show Members Import Bulk Status By Request Number
      • Show Members Import Bulk Status
    • Groups
      • Introduction
      • Groups
        • List Member Groups
        • Show Member Group
        • Create Member Group
        • Update Member Group
        • Destroy Member Group
      • Types
        • List Member Groups Types
    • Programs
      • Introduction
      • Create Program
      • List Programs
      • Show Program
      • Update Program
      • Destroy Program
    • Benefits
      • Introduction
      • Create Benefit
      • List Benefits
      • Show Benefit
      • Update Benefit
      • Archive Benefit
      • Restore Benefit
      • Destroy Benefit
    • Cars
      • Show Cars Configuration
      • Update Cars Configuration
    • Webhooks
      • Introduction
      • Subscriptions Management
        • List Members Notifications Subscriptions
        • Create Members Notifications Subscription
        • Update Members Notifications Subscription
        • Destroy Members Notifications Subscription
    • Misc
      • Generate Link
    • Receipts
      • Introduction
      • List Submissions
      • Show Submission
      • Update Submission
      • Check Limits Exceeded
    • Messages
      • Send "delivered" event for push message
      • Send "open" event for push message
  • Stores
    • V4 API
      • Stores
        • Store Model
        • List Stores
        • Show Store
        • Create Store
        • Update Store
        • Archive Store
        • Restore Store
        • Destroy Store
        • Update Store receipt information
      • Retailers
        • Retailer Model
        • List Retailers
        • Show Retailer
      • Categories
        • StoreCategory Model
        • List Stores Categories
        • Show Stores Category
        • Create Stores Category
        • Update Stores Category
        • Destroy Stores Category
      • Store Categories
        • Add Store To Category
        • Remove Store From Category
        • Bulk Update Store Categories
    • V3 API
      • Stores
        • List Stores
        • Show Store By Store ID
        • Show Store
        • Create Store
        • Update Store By Store ID
        • Update Store
        • Delete Store By Store ID
        • Delete Store
        • List User Stores
      • Categories
        • List Store Categories
      • Zones
        • List Stores Zones
      • Floors
        • List Stores Floors
      • Tenant Categories
        • List Stores Tenant Categories
      • Store events
        • Create Store Event
      • Departments
        • List Store Departments
        • Show Store Department By Department ID
        • Create Store Department
        • Update Store Department by Department ID
        • Update Store Department
  • Offers
    • Introduction
    • Offers
      • Show Offer
      • List Offers
      • List Offers Groups
      • Create Offers
      • Update Offers
      • Clone Offers
      • Grant Offers
      • Archive Offers
    • Collections
      • List Collections
      • Show Collection
      • Create Collection
      • Update Collection
      • Archive Collection
      • Update Collections Order
    • Image Templates
      • Introduction
      • List Offer Image Templates
      • Show Offer Image Template
      • Preview Offer Image Template
      • Create Offer Image Template
      • Update Offer Image Template
      • Destroy Offer Image Template
    • Files
      • Introduction
      • Show File Schema
        GET
  • Rewards
    • Points expiration notifications policy
      • Introduction
      • Show Points Expiration Notifications Policy
      • Update Points Expiration Notifications Policy
  • Triggerer
    • Rules
      • Introduction
      • List Triggerer Rules
      • Show Triggerer Rule
      • Create Triggerer Rule
      • Update Triggerer Rule
      • Pause Triggerer Rule
      • Start Triggerer Rule
      • Delete Triggerer Rule
    • Event Types Schema
      • Show Event Types Schema
    • Point Multipliers
      • Introduction
      • List Point Multipliers
      • Show Point Multiplier
      • Create Point Multiplier
      • Update Point Multiplier
      • Destroy Point Multiplier
  • CMS
    • Introduction
    • Venue Info
      • Introduction
      • Show Venue Info
      • Update Venue Info
    • Pages
      • Page Model
      • Components
        • Component Model and Schema
        • System Components
        • Custom Components
          • Introduction
          • List Custom Components
          • Show Custom Component
          • Create Custom Component
          • Update Custom Component
          • Archive Custom Component
          • Restore Custom Component
          • Destroy Custom Component
        • Show Components Schema
        • Validate Component
      • List Services
      • List Pages
      • Show Page
      • Create Page
      • Update Page
      • Archive Page
      • Restore Page
      • Destroy Page
      • List Merge Properties
    • Website
      • Website Model
      • Website Domains
        • Introduction
        • List Website Domains
        • Show Website Domain
        • Create Website Domain
        • Update Website Domain
        • Destroy Website Domain
      • Show Website
      • Update Website
    • Landing Pages
      • Introduction
      • Landing Page Templates
        • Introduction
        • Bee Templates
          • Introduction
          • List Bee Landing Page Templates
          • List Bee Landing Page Templates Tags
          • Show Bee Landing Page Templates
        • List Landing Page Templates
        • Show Landing Page Template
        • Create Landing Page Template
        • Update Landing Page Template
        • Destroy Landing Page Template
      • List Landing Pages
      • Show Landing Page
      • Create Landing Page
      • Update Landing Page
      • Archive Landing Page
      • Restore Landing Page
      • Destroy Landing Page
    • Articles
      • Article Model
      • Articles Categories
        • List Articles Categories
        • Show Articles Category
        • Create Articles Category
        • Update Articles Category
        • Destroy Articles Category
      • List Articles
      • Show Article
      • Create Article
      • Update Article
      • Archive Article
      • Restore Article
      • Destroy Article
    • Events
      • Event Model
      • Events Groups
        • Introduction
        • List Events Groups
        • Show Events Group
        • Create Events Group
        • Update Events Group
        • Destroy Events Group
      • Events Categories
        • List Events Categories
        • Show Events Category
        • Create Events Category
        • Update Events Category
        • Destroy Events Category
      • List Events
      • Show Event
      • Create Event
      • Update Event
      • Archive Event
      • Restore Event
      • Destroy Event
    • Job Postings
      • Introduction
      • List Job Postings
      • Show Job Posting
      • Create Job Posting
      • Update Job Posting
      • Archive Job Posting
      • Restore Job Posting
      • Destroy Job Posting
    • Press Releases
      • PressRelease Model
      • List Press Releases
      • Show Press Release
      • Create Press Release
      • Update Press Release
      • Archive Press Release
      • Restore Press Release
      • Destroy Press Release
    • Tags
      • Tag Model
      • List Tags
      • Show Tag
      • Create Tag
      • Update Tag
      • Destroy Tag
    • Attachments
      • Attachment Model
      • List attachments
      • Show Attachment
      • Create Attachment
      • Update Attachment
      • Destroy Attachment
    • Service Messages
      • Introduction
      • List Service Messages
      • Show Service Message
      • Create Service Message
      • Update Service Message
      • Archive Service Message
      • Restore Service Message
      • Destroy Service Message
    • Mixed Content
      • Search Mixed Content
    • Redirections
      • Redirection Model
      • List Redirections
      • Show Redirection
      • Create Redirection
      • Update Redirection
      • Archive Redirection
      • Restore Redirection
      • Destroy Redirection
  • Events
    • Events
      • List Events
      • Show Event
      • Check Member Status
    • Checkins
      • Checkin Member to the Event
      • List Checkins
    • Invitations
      • Send Invitation
    • Registration
      • List Events
      • Show Event
      • Show Calendar
      • Register Member
      • Unregister Member
      • Show Member Available Actions
  • Games
    • Add Languages to Game
    • Add Component to Game
    • Show Game Schema
    • Show Single Game Schema
    • Show Game Components
    • List Games
    • Update Game Component
    • Delete Component Data
    • Show Game Details
    • Create Game
    • Update Game
    • Delete Game
    • Show Game Languages
  • Scraper
    • Scraper
      • Run Scraper
    • Shopping mall
      • List Scraped Shopping Malls
      • Show Scraped Shopping Mall
      • Add Scraped Shopping Mall
      • Update Scraped Shopping Mall
      • Delete Scraped Shopping Mall
    • Shopping mall language
      • List Scraped Languages
      • Show Scraped Language
      • Add Scraped Language
      • Update Scraped Language
      • Delete Scraped Language
    • Menu item
      • List Scraped Menu Items
      • Show Scraped Menu Item
      • Add Scraped Menu Item
      • Update Scraped Menu Item
      • Delete Scraped Menu Item
  • Files
    • Introduction
    • Uploads
      • Start Upload
      • Upload Part
      • Finish Upload
      • Activate Uploaded File
      • Upload status
    • Upload from URL
    • List File Records
    • Destroy File Records
  • Receipts
    • Introduction
    • Loyalty Club Configuration
    • Receipt Submissions
    • Show Receipts Configuration
    • Update Receipts Configuration
    • Show Receipt Submission
    • Update Receipt Submissions
    • List Receipt Submissions
  • Messaging History
    • Messages List v2
    • Show Choosen Member Messages History v2
    • Messages List
  1. Files

Introduction

The Files API allows to manipulate images of Offers, Offers
and Rewards.

File model#

Every file attached to some entity (Offer, Reward, Offer Collection) follows the file schema and is defined like this:

Definition#

KeyTypeDescription
urlURLLink to the file
widthintegerImage width
heightintegerImage height
kindstringFile kind identifier (e.x. offer_default), see Standard file kinds
size_typestringe.x. base, see: File sizes

File schema#

File schema defines a list of files kinds available in the Loyalty club.
Each file kind is also available in multiple sizes.
The schema may get retrieved with Files> Get schema endpoint.

Example#

{
  "files_kinds": [
    {
      "identifier": "collection_cover_default",
      "type": "IMAGE",
      "ratio": "2:1",
      "sizes": [
        {
          "identifier": "base",
          "min_width": 600,
          "min_height": 300,
          "max_width": 600,
          "max_height": 300
        },
        {
          "identifier": "thumbnail",
          "min_width": 300,
          "min_height": 150,
          "max_width": 300,
          "max_height": 150
        },
        {
          "identifier": "original",
          "min_width": 600,
          "min_height": 300,
          "max_width": null,
          "max_height": null
        }
      ]
    },
    {
      "identifier": "offer_default",
      "type": "IMAGE",
      "ratio": "3:4",
      "sizes": [
        {
          "identifier": "base",
          "min_width": 600,
          "min_height": 800,
          "max_width": 600,
          "max_height": 800
        },
        {
          "identifier": "thumbnail",
          "min_width": 225,
          "min_height": 300,
          "max_width": 225,
          "max_height": 300
        },
        {
          "identifier": "original",
          "min_width": 600,
          "min_height": 800,
          "max_width": null,
          "max_height": null
        }
      ]
    },
    {
      "identifier": "reward_default",
      "type": "IMAGE",
      "ratio": "3:4",
      "sizes": [
        {
          "identifier": "base",
          "min_width": 600,
          "min_height": 800,
          "max_width": 600,
          "max_height": 800
        },
        {
          "identifier": "thumbnail",
          "min_width": 225,
          "min_height": 300,
          "max_width": 225,
          "max_height": 300
        },
        {
          "identifier": "original",
          "min_width": 600,
          "min_height": 800,
          "max_width": null,
          "max_height": null
        }
      ]
    },
    {
      "identifier": "example_without_ratio",
      "type": "IMAGE",
      "ratio": null,
      "sizes": [
        {
          "identifier": "base",
          "min_width": 600,
          "min_height": 600,
          "max_width": null,
          "max_height": null
        },
        {
          "identifier": "thumbnail",
          "min_width": null,
          "min_height": null,
          "max_width": 300,
          "max_height": 300
        },
        {
          "identifier": "original",
          "min_width": 600,
          "min_height": 600,
          "max_width": null,
          "max_height": null
        }
      ]
    }
  ]
}

File kind model#

KeyTypeDescription
identifierstringSee: Standard file kinds
typestringCurrently, only IMAGE (MIME: image/gif, image/jpeg, image/png) is supported
ratiostringDescribes ratio of an image. See: Ratio (optional)
sizesObject[]See: File sizes
sizes[]['identifier']string
sizes[]['min_width']integer(optional)
sizes[]['min_height']integer(optional)
sizes[]['max_width']integer(optional)
sizes[]['max_height']integer(optional)

Standard file kinds#

There are some standard file kinds, their size definitions differ among Loyalty Clubs.
IdentifierDescription
collection_cover_defaultCover for Offer collections
offer_defaultDefault Offer image
reward_defaultDefault Reward image

Ratio#

Images may have fixed proportions ratio which is represented as a string: "<width>:<height>"

File sizes#

Every file has at least three file sizes available:

base#

Actual file size. Currently all file kinds have this size with fixed proportions (so min_* == max_*) that match the ratio.

thumbnail#

Rescaled version of base size. Currently, rescaling always works this way:
pick the higher dimension of file
shrink the image so:
the higher dimension gets shrunk to 300px
the lower dimensions gets shrunk so the image keeps the original ratio
Example:
File with resolution 600x800 gets shrunk down to 225x300
File with resolution 800x600 gets shrunk down to 300x225
File with resolution 400x300 gets shrunk down to 300x225
File with resolution 400x200 gets shrunk down to 300x150
File with resolution 300x250 is not shrunk down

original#

Original file that that has been uploaded and used for generating other file sizes.
Currently, we require all original files to have proper ratios and minimum sizes of at least the base size.
Because of that, you can expect them to have min_height and min_width that match the base size,
but they never have max_width or max_height defined.

File cropping#

crop_to param interpretation may be visualized like this:

                           x_top_left     x_bottom_right
                    |-------------------------------------
                    | ..........................
                    | ..........................
     y_top_left     | .....*---------------.....
                    | .....|..............|.....
                    | .....|..............|.....
                    | .....|..............|....
     y_bottom_right | .....---------------*.....
                    | ..........................
                    |
When file is uploaded and it's too large to match the required base size, it may get cropped.
This can be achieved by providing cropping param (crop_to).
The param has following syntax: x_top_left,y_top_left,x_bottom_right,y_bottom_right and represents boundaries of a cropping area.
When uploaded file is too large and crop_to param is not provided, the file will be automatically cropped with gravity set in center of image.
Example
The kind's base size is 400x200px and the uploaded file is 1000x1000px.
With crop_to="0,250,1000,750", a rectangle of "1000x500" size will be cropped, with 250px left offset.
The file will be then also resized to 400x200.

Uploaded instances projections#

When file is uploaded, only original file is physically processed and stored. base and other versions are processed asynchronously.
So, the responses returned on upload contains only "projected" info about files.
KeyTypeDescription
size_typestring
urlstringAn URL the file be available on after it gets processed.
min_widthinteger
max_widthinteger
min_heightinteger
max_heightinteger
Previous
Destroy Offer Image Template
Next
Show File Schema
Built with