openapi: 3.2.0 info: title: Platform Functions Social Cause Campaigns API version: '1.0' description: This API documentation is intended to provide comprehensive information for admin users of the Punchh platform. Many of the settings and available actions depend on an appropriate level of access to Platform Functions APIs. contact: name: Punchh DevSupport url: https://developers.punchh.com servers: - url: https://SERVER_NAME_GOES_HERE.punchh.com tags: - name: Social Cause Campaigns paths: /api2/dashboard/social_cause_campaigns: post: responses: '200': description: '' content: application/json: schema: type: object properties: social_cause_id: type: integer description: Unique ID assigned to the social cause campaign. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform. name: type: string description: Name of the social cause campaign as defined by the business admin when creating the social cause campaign in the Punchh platform description: type: string description: Description of the social cause campaign as defined by the business admin image_url: type: string description: URL of the image that is attached to the social cause campaign by the business admin miscellaneous: type: 'null' description: Returns miscellaneous response string as configured in the Punchh platform city: type: string description: City state: type: string description: State street: type: string description: Street name zip: type: string description: Zip code phone_number: type: string description: Phone number email: type: string description: Email address address: type: string description: Address activated: type: boolean description: Status of the social cause campaign examples: default: value: social_cause_id: 745 name: social_cause_campaign_19 description: social_cause_campaign_description_19 image_url: IMAGE_URL_GOES_HERE miscellaneous: null city: test_city state: Rajasthan street: ADDRESS_GOES_HERE zip: '302001' phone_number: '1111111111' email: test@example.com address: ADDRESS_GOES_HERE activated: true '401': $ref: '#/components/responses/401-unauthorized' summary: Create Social Cause Campaign description: Allows an admin user to create a social cause campaign on the Punchh platform operationId: dashboard_create_social_cause_campaigns tags: - Social Cause Campaigns parameters: - $ref: '#/components/parameters/authorization-header' x-stoplight: id: ad1a1e17cd024 requestBody: content: application/json: schema: type: object properties: social_cause_campaign: type: object properties: name: type: string description: Name of the social cause campaign as defined by the business admin when creating the social cause campaign in the Punchh platform description: type: string description: Description of the social cause campaign as defined by the business admin city: type: string description: City state: type: string description: State street: type: string description: Street name zip: type: string description: Zip code phone_number: type: string description: Phone number email: type: string description: Email address address: type: string description: Address start_date: type: string description: Start date of the social cause campaign end_date: type: string description: End date of the social cause campaign remote_image_url: type: string description: URL of the image that is attached to the social cause campaign by the business admin examples: social_cause_campaign: value: name: social_cause_campaign_19 description: social_cause_campaign_description_19 city: test_city state: Rajasthan street: ADDRESS_GOES_HERE zip: '302001' phone_number: '1111111111' email: test@example.com address: ADDRESS_GOES_HERE start_date: '2019-06-26' end_date: '2019-06-26' remote_image_url: IMAGE_URL_GOES_HERE /api2/dashboard/social_cause_campaigns/activate: patch: responses: '200': description: '' content: application/json: schema: type: object properties: social_cause_id: type: integer description: Unique ID assigned to the social cause campaign. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform. name: type: string description: Name of the social cause campaign as defined by the business admin when creating the social cause campaign in the Punchh platform description: type: string description: Description of the social cause campaign as defined by the business admin image_url: type: string description: URL of the image that is attached to the social cause campaign by the business admin miscellaneous: type: 'null' description: Returns miscellaneous response string as configured in the Punchh platform city: type: string description: City state: type: string description: State street: type: string description: Street name zip: type: string description: Zip code phone_number: type: string description: Phone number email: type: string description: Email address address: type: string description: Address activated: type: boolean description: Status of the social cause campaign examples: default: value: social_cause_id: 20504 name: social_cause_campaign_20 description: social_cause_campaign_description_19 image_url: IMAGE_URL_GOES_HERE miscellaneous: null city: test_city state: Rajasthan street: ADDRESS_GOES_HERE zip: '302001' phone_number: '1111111111' email: test@example.com address: ADDRESS_GOES_HERE activated: true summary: Activate Social Cause Campaign description: Activates a social cause campaign operationId: dashboard_social_cause_activate tags: - Social Cause Campaigns parameters: - $ref: '#/components/parameters/authorization-header' x-stoplight: id: 8081186acdbd5 requestBody: content: application/json: schema: type: object properties: social_cause_id: type: integer description: Unique ID assigned to the social cause campaign that will be activated. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform. required: - social_cause_id examples: default: value: social_cause_id: 20504 /api2/dashboard/social_cause_campaigns/deactivate: patch: responses: '200': description: '' content: application/json: schema: type: object properties: social_cause_id: type: integer description: Unique ID assigned to the social cause campaign. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform. name: type: string description: Name of the social cause campaign as defined by the business admin when creating the social cause campaign in the Punchh platform description: type: string description: Description of the social cause campaign as defined by the business admin image_url: type: string description: URL of the image that is attached to the social cause campaign by the business admin miscellaneous: type: 'null' description: Returns miscellaneous response string as configured in the Punchh platform city: type: string description: City state: type: string description: State street: type: string description: Street name zip: type: string description: Zip code phone_number: type: string description: Phone number email: type: string description: Email address address: type: string description: Address activated: type: boolean description: Status of the social cause campaign examples: default: value: social_cause_id: 20504 name: social_cause_campaign_20 description: social_cause_campaign_description_19 image_url: IMAGE_URL_GOES_HERE miscellaneous: null city: test_city state: Rajasthan street: ADDRESS_GOES_HERE zip: '302001' phone_number: '1111111111' email: test@example.com address: ADDRESS_GOES_HERE activated: false summary: Deactivate Social Cause Campaign operationId: dashboard_social_cause_deactivate tags: - Social Cause Campaigns description: Deactivates a social cause campaign parameters: - schema: type: string default: Bearer BUSINESS_ADMIN_KEY_GOES_HERE in: header name: Authorization x-stoplight: id: b166d42a3b587 requestBody: content: application/json: schema: type: object properties: social_cause_id: type: integer description: Unique ID assigned to the social cause campaign that will be deactivated. This ID is generated by Punchh when the social cause campaign is created in the Punchh platform. required: - social_cause_id examples: default: value: social_cause_id: 20504 components: responses: 401-unauthorized: description: 'A business admin key is missing or invalid. A request header in the following format is needed to make the request: `Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE`' content: application/json: schema: type: object properties: error: type: string examples: default: value: error: You need to sign in or sign up before continuing. parameters: authorization-header: schema: type: string default: Bearer BUSINESS_ADMIN_KEY_GOES_HERE name: Authorization in: header description: 'Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".' required: true x-stoplight: id: 9820bbd2e8ee1 x-ext-urls: {}